public class SerializerHandler extends Object implements com.lmax.disruptor.EventHandler<CommandHandlingEntry>
Constructor and Description |
---|
SerializerHandler(Serializer serializer,
int serializerSegmentId,
Class<?> serializedRepresentation)
Initialize the handler using given
serializer and processing the segment Id with given
serializerId (in case of multiple serializer threads). |
public SerializerHandler(Serializer serializer, int serializerSegmentId, Class<?> serializedRepresentation)
serializer
and processing the segment Id with given
serializerId
(in case of multiple serializer threads).serializer
- The serializer to pre-serialize withserializerSegmentId
- The segment of this instance to handleserializedRepresentation
- The representation to which to serialize the payload and meta datapublic void onEvent(CommandHandlingEntry event, long sequence, boolean endOfBatch) throws Exception
onEvent
in interface com.lmax.disruptor.EventHandler<CommandHandlingEntry>
Exception
Copyright © 2010-2014. All Rights Reserved.