Class HazelcastClusterEventWrapper
- java.lang.Object
-
- java.util.EventObject
-
- org.springframework.context.ApplicationEvent
-
- com.atlassian.event.Event
-
- com.atlassian.confluence.event.events.ConfluenceEvent
-
- com.atlassian.confluence.event.events.cluster.ClusterEventWrapper
-
- com.atlassian.confluence.cluster.hazelcast.HazelcastClusterEventWrapper
-
- All Implemented Interfaces:
com.hazelcast.nio.serialization.DataSerializable
,Serializable
public class HazelcastClusterEventWrapper 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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.event.events.cluster.ClusterEventWrapper
event
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description HazelcastClusterEventWrapper()
HazelcastClusterEventWrapper(Object src, com.atlassian.event.Event event)
Create a clustered wrapper event to broadcast an event across a cluster.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.atlassian.event.Event
getEvent()
void
readData(com.hazelcast.nio.ObjectDataInput in)
void
writeData(com.hazelcast.nio.ObjectDataOutput out)
-
Methods inherited from class com.atlassian.confluence.event.events.ConfluenceEvent
equals, hashCode
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
HazelcastClusterEventWrapper
public HazelcastClusterEventWrapper(Object src, com.atlassian.event.Event 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 aClusterNodeInformation
object.event
- an event to be wrapped
-
HazelcastClusterEventWrapper
public HazelcastClusterEventWrapper()
-
-
Method Detail
-
getEvent
public com.atlassian.event.Event getEvent()
- Overrides:
getEvent
in classClusterEventWrapper
- Returns:
- the wrapped event
-
writeData
public void writeData(com.hazelcast.nio.ObjectDataOutput out) throws IOException
- Specified by:
writeData
in interfacecom.hazelcast.nio.serialization.DataSerializable
- Throws:
IOException
-
readData
public void readData(com.hazelcast.nio.ObjectDataInput in) throws IOException
- Specified by:
readData
in interfacecom.hazelcast.nio.serialization.DataSerializable
- Throws:
IOException
-
-