Class ThreadLocalMarshallerProvider
- java.lang.Object
-
- io.netty.handler.codec.marshalling.ThreadLocalMarshallerProvider
-
- All Implemented Interfaces:
MarshallerProvider
public class ThreadLocalMarshallerProvider extends java.lang.Object implements MarshallerProvider
UnmarshallerProviderimplementation which use aThreadLocalto store references toMarshallerinstances. This may give you some performance boost if you need to marshall many smallObject's and your actual Thread count is not to big
-
-
Constructor Summary
Constructors Constructor Description ThreadLocalMarshallerProvider(org.jboss.marshalling.MarshallerFactory factory, org.jboss.marshalling.MarshallingConfiguration config)Create a new instance of theThreadLocalMarshallerProvider
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jboss.marshalling.MarshallergetMarshaller(ChannelHandlerContext ctx)Get aMarshallerfor the givenChannelHandlerContext
-
-
-
Constructor Detail
-
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 Detail
-
getMarshaller
public org.jboss.marshalling.Marshaller getMarshaller(ChannelHandlerContext ctx) throws java.lang.Exception
Description copied from interface:MarshallerProviderGet aMarshallerfor the givenChannelHandlerContext- Specified by:
getMarshallerin interfaceMarshallerProvider- Throws:
java.lang.Exception
-
-