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
| Modifier and Type | Field and Description |
|---|---|
| private final MarshallingConfiguration | |
| private final MarshallerFactory | |
| private final FastThreadLocal |
| Access | Constructor and Description |
|---|---|
| public | ThreadLocalMarshallerProvider(MarshallerFactory
the factory, MarshallingConfiguration MarshallerFactory to use to create Marshaller's if neededthe config)MarshallingConfiguration to useCreate a new instance of the |
| Modifier and Type | Method and Description |
|---|---|
| public Marshaller | getMarshaller(ChannelHandlerContext ctx)
Implements io. Marshaller for the given ChannelHandlerContext
|
| config | back to summary |
|---|---|
| private final MarshallingConfiguration config | |
| factory | back to summary |
|---|---|
| private final MarshallerFactory factory | |
| marshallers | back to summary |
|---|---|
| private final FastThreadLocal<Marshaller> marshallers | |
| ThreadLocalMarshallerProvider | back to summary |
|---|---|
| public ThreadLocalMarshallerProvider(MarshallerFactory factory, MarshallingConfiguration config) Create a new instance of the
| |
| getMarshaller | back to summary |
|---|---|
| public Marshaller getMarshaller(ChannelHandlerContext ctx) throws Exception Implements io. Doc from io. Get a
| |