public class ThreadLocalMarshallerProvider extends java.lang.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 big| 构造器和说明 |
|---|
ThreadLocalMarshallerProvider(MarshallerFactory factory,
MarshallingConfiguration config)
Create a new instance of the
ThreadLocalMarshallerProvider |
| 限定符和类型 | 方法和说明 |
|---|---|
Marshaller |
getMarshaller(ChannelHandlerContext ctx)
Get a
Marshaller for the given ChannelHandlerContext |
public ThreadLocalMarshallerProvider(MarshallerFactory factory,
MarshallingConfiguration config)
ThreadLocalMarshallerProviderfactory - the MarshallerFactory to use to create Marshaller's if neededconfig - the MarshallingConfiguration to usepublic Marshaller getMarshaller(ChannelHandlerContext ctx) throws java.lang.Exception
MarshallerProviderMarshaller for the given ChannelHandlerContextgetMarshaller 在接口中 MarshallerProviderjava.lang.Exception