Class ThreadLocalMarshallerProvider
java.lang.Object
io.netty.handler.codec.marshalling.ThreadLocalMarshallerProvider
- All Implemented Interfaces:
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 big-
Constructor Summary
ConstructorsConstructorDescriptionThreadLocalMarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config) Create a new instance of theThreadLocalMarshallerProvider -
Method Summary
Modifier and TypeMethodDescriptionorg.jboss.marshalling.MarshallerGet aMarshallerfor the givenChannelHandlerContext
-
Constructor Details
-
ThreadLocalMarshallerProvider
public ThreadLocalMarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config) Create a new instance of theThreadLocalMarshallerProvider- Parameters:
factory- theMarshallerFactoryto use to createMarshaller's if neededconfig- theMarshallingConfigurationto use
-
-
Method Details
-
getMarshaller
Description copied from interface:MarshallerProviderGet aMarshallerfor the givenChannelHandlerContext- Specified by:
getMarshallerin interfaceMarshallerProvider- Throws:
Exception
-