org.axonframework.commandhandling.disruptor
Class SerializerHandler

java.lang.Object
  extended by 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).
 
Method Summary
 void onEvent(CommandHandlingEntry event, long sequence, boolean endOfBatch)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 with
serializerSegmentId - The segment of this instance to handle
serializedRepresentation - The representation to which to serialize the payload and meta data
Method Detail

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.