org.axonframework.commandhandling.disruptor
Class SerializerHandler
java.lang.Object
org.axonframework.commandhandling.disruptor.SerializerHandler
- All Implemented Interfaces:
- com.lmax.disruptor.EventHandler<CommandHandlingEntry>
public class SerializerHandler
- extends Object
- implements com.lmax.disruptor.EventHandler<CommandHandlingEntry>
Disruptor Event Handler that serializes EventMessage implementations that are also SerializationAware.
- Since:
- 2.0
- Author:
- Allard Buijze
Constructor Summary |
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). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SerializerHandler
public 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).
- Parameters:
serializer
- The serializer to pre-serialize withserializerSegmentId
- The segment of this instance to handleserializedRepresentation
- The representation to which to serialize the payload and meta data
onEvent
public void onEvent(CommandHandlingEntry event,
long sequence,
boolean endOfBatch)
throws Exception
- Specified by:
onEvent
in interface com.lmax.disruptor.EventHandler<CommandHandlingEntry>
- Throws:
Exception
Copyright © 2010-2016. All Rights Reserved.