Class HazelcastClusterEventWrapper<T extends ClusterEvent>

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
All Implemented Interfaces:
com.hazelcast.nio.serialization.DataSerializable, Serializable

public class HazelcastClusterEventWrapper<T extends ClusterEvent> extends ClusterEventWrapper implements Serializable, com.hazelcast.nio.serialization.DataSerializable
Hazelcast specific implementation of the ClusterEventWrapper. This version is DataSerializable, and uses OsgiSafe to hold the event. This allows Hazelcast to serialize/deserialze it nicely
See Also:
  • Constructor Details

    • HazelcastClusterEventWrapper

      public HazelcastClusterEventWrapper(Object src, T event)
      Create a clustered wrapper event to broadcast an event across a cluster.
      Parameters:
      src - an Object which represents where the event came from. In the case of clustered events, the recommended src value is a ClusterNodeInformation object.
      event - an event to be wrapped
    • HazelcastClusterEventWrapper

      public HazelcastClusterEventWrapper()
  • Method Details

    • getEvent

      public T getEvent()
      Overrides:
      getEvent in class ClusterEventWrapper
      Returns:
      the wrapped event
    • writeData

      public void writeData(com.hazelcast.nio.ObjectDataOutput out) throws IOException
      Specified by:
      writeData in interface com.hazelcast.nio.serialization.DataSerializable
      Throws:
      IOException
    • readData

      public void readData(com.hazelcast.nio.ObjectDataInput in) throws IOException
      Specified by:
      readData in interface com.hazelcast.nio.serialization.DataSerializable
      Throws:
      IOException