Package com.hazelcast.core
Class DistributedObjectEvent
java.lang.Object
java.util.EventObject
com.hazelcast.core.DistributedObjectEvent
- All Implemented Interfaces:
Serializable
public class DistributedObjectEvent extends EventObject
DistributedObjectEvent is fired when a
DistributedObject
is created or destroyed cluster-wide.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DistributedObjectEvent.EventType
Type of the DistributedObjectEvent. -
Field Summary
Fields Modifier and Type Field Description protected DistributedObject
distributedObject
-
Constructor Summary
Constructors Constructor Description DistributedObjectEvent(DistributedObjectEvent.EventType eventType, String serviceName, String objectName, DistributedObject distributedObject, UUID source)
Constructs a DistributedObject Event. -
Method Summary
Modifier and Type Method Description DistributedObject
getDistributedObject()
Returns the DistributedObject instance.DistributedObjectEvent.EventType
getEventType()
Returns the type of this event; one ofDistributedObjectEvent.EventType.CREATED
orDistributedObjectEvent.EventType.DESTROYED
.Object
getObjectName()
Returns the name of related DistributedObject.String
getServiceName()
Returns the service name of related DistributedObject.String
toString()
-
Field Details
-
Constructor Details
-
DistributedObjectEvent
public DistributedObjectEvent(DistributedObjectEvent.EventType eventType, String serviceName, String objectName, DistributedObject distributedObject, UUID source)Constructs a DistributedObject Event.- Parameters:
eventType
- The event type as an enumDistributedObjectEvent.EventType
integer.serviceName
- The service name of the DistributedObject.objectName
- The name of the DistributedObject.distributedObject
- The DistributedObject for the event.source
- The UUID of the client or member which initialized create/destroy.
-
-
Method Details
-
getServiceName
Returns the service name of related DistributedObject.- Returns:
- service name of DistributedObject
-
getEventType
Returns the type of this event; one ofDistributedObjectEvent.EventType.CREATED
orDistributedObjectEvent.EventType.DESTROYED
.- Returns:
- The type of this event
DistributedObjectEvent.EventType
.
-
getObjectName
Returns the name of related DistributedObject.- Returns:
- the name of DistributedObject
- See Also:
DistributedObject.getName()
-
getDistributedObject
Returns the DistributedObject instance.- Returns:
- the DistributedObject instance
- Throws:
DistributedObjectDestroyedException
- if distributed object is destroyed.
-
toString
- Overrides:
toString
in classEventObject
-