public class ThreadLocalMarshallerProvider extends Object implements MarshallerProvider
UnmarshallerProvider
implementation which use a ThreadLocal
to store references
to Marshaller
instances. This may give you some performance boost if you need to marshall
many small Object
's and your actual Thread count is not to bigConstructor and Description |
---|
ThreadLocalMarshallerProvider(org.jboss.marshalling.MarshallerFactory factory,
org.jboss.marshalling.MarshallingConfiguration config)
Create a new instance of the
ThreadLocalMarshallerProvider |
Modifier and Type | Method and Description |
---|---|
org.jboss.marshalling.Marshaller |
getMarshaller(ChannelHandlerContext ctx)
Get a
Marshaller for the given ChannelHandlerContext |
public ThreadLocalMarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config)
ThreadLocalMarshallerProvider
factory
- the MarshallerFactory
to use to create Marshaller
's if neededconfig
- the MarshallingConfiguration
to usepublic org.jboss.marshalling.Marshaller getMarshaller(ChannelHandlerContext ctx) throws Exception
MarshallerProvider
Marshaller
for the given ChannelHandlerContext
getMarshaller
in interface MarshallerProvider
Exception
Copyright © 2008-2013 The Netty Project. All Rights Reserved.