Class HazelcastClusterEventWrapper<T extends ClusterEvent>
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
com.atlassian.confluence.event.events.ConfluenceEvent
com.atlassian.confluence.event.events.cluster.ClusterEventWrapper
com.atlassian.confluence.cluster.hazelcast.HazelcastClusterEventWrapper<T>
- 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:
-
Field Summary
Fields inherited from class com.atlassian.confluence.event.events.cluster.ClusterEventWrapper
event
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionHazelcastClusterEventWrapper
(Object src, T event) Create a clustered wrapper event to broadcast an event across a cluster. -
Method Summary
Methods inherited from class com.atlassian.confluence.event.events.cluster.ClusterEventWrapper
unwrapIfType
Methods inherited from class com.atlassian.confluence.event.events.ConfluenceEvent
equals, hashCode
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
Methods inherited from class java.util.EventObject
getSource, toString
-
Constructor Details
-
HazelcastClusterEventWrapper
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 aClusterNodeInformation
object.event
- an event to be wrapped
-
HazelcastClusterEventWrapper
public HazelcastClusterEventWrapper()
-
-
Method Details
-
getEvent
- Overrides:
getEvent
in classClusterEventWrapper
- Returns:
- the wrapped event
-
writeData
- Specified by:
writeData
in interfacecom.hazelcast.nio.serialization.DataSerializable
- Throws:
IOException
-
readData
- Specified by:
readData
in interfacecom.hazelcast.nio.serialization.DataSerializable
- Throws:
IOException
-