Top Description Fields Constructors Methods
io.netty.handler.codec.marshalling

public Class ThreadLocalMarshallerProvider

extends Object
implements MarshallerProvider
Class Inheritance
All Implemented Interfaces
io.netty.handler.codec.marshalling.MarshallerProvider
Imports
io.netty.channel.ChannelHandlerContext, io.netty.util.concurrent.FastThreadLocal, org.jboss.marshalling.Marshaller, .MarshallerFactory, .MarshallingConfiguration

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

Field Summary

Modifier and TypeField and Description
private final MarshallingConfiguration
private final MarshallerFactory
private final FastThreadLocal<Marshaller>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Marshaller
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configback to summary
private final MarshallingConfiguration config
factoryback to summary
private final MarshallerFactory factory
marshallersback to summary
private final FastThreadLocal<Marshaller> marshallers

Constructor Detail

ThreadLocalMarshallerProviderback to summary
public ThreadLocalMarshallerProvider(MarshallerFactory factory, MarshallingConfiguration config)

Create a new instance of the ThreadLocalMarshallerProvider

Parameters
factory:MarshallerFactory

the MarshallerFactory to use to create Marshaller's if needed

config:MarshallingConfiguration

the MarshallingConfiguration to use

Method Detail

getMarshallerback to summary
public Marshaller getMarshaller(ChannelHandlerContext ctx) throws Exception

Implements io.netty.handler.codec.marshalling.MarshallerProvider.getMarshaller.

Doc from io.netty.handler.codec.marshalling.MarshallerProvider.getMarshaller.

Get a Marshaller for the given ChannelHandlerContext

Annotations
@Override