com.hazelcast.core

## Class DistributedObjectEvent

- java.lang.Object
- - com.hazelcast.core.DistributedObjectEvent

-     public class DistributedObjectEvent
      extends Object

  DistributedObjectEvent is fired when a `DistributedObject` is created or destroyed cluster-wide.
  See Also:
    `DistributedObject`, `DistributedObjectListener`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DistributedObjectEvent.EventType` Type of the DistributedObjectEvent.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DistributedObject` | `distributedObject`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DistributedObjectEvent(DistributedObjectEvent.EventType eventType, String serviceName, String objectName, DistributedObject distributedObject)` Constructs a DistributedObject Event.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `DistributedObject` | `getDistributedObject()` Returns the DistributedObject instance.
    `DistributedObjectEvent.EventType` | `getEventType()` Returns the type of this event; one of `DistributedObjectEvent.EventType.CREATED` or `DistributedObjectEvent.EventType.DESTROYED`.
    `Object` | `getObjectId()` Deprecated. since 3.5. Please use `getObjectName()` instead.
    `Object` | `getObjectName()` Returns the name of related DistributedObject.
    `String` | `getServiceName()` Returns the service name of related DistributedObject.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### distributedObject

          protected DistributedObject distributedObject

  - ### Constructor Detail

    - #### DistributedObjectEvent

          public DistributedObjectEvent(DistributedObjectEvent.EventType eventType,
                                        String serviceName,
                                        String objectName,
                                        DistributedObject distributedObject)

      Constructs a DistributedObject Event.
      Parameters:
        `eventType` - The event type as an enum `DistributedObjectEvent.EventType` integer.
        `serviceName` - The service name of the DistributedObject.
        `objectName` - The name of the DistributedObject.
        `distributedObject` - The DistributedObject for the event.

  - ### Method Detail

    - #### getServiceName

          public String getServiceName()

      Returns the service name of related DistributedObject.
      Returns:
        service name of DistributedObject

    - #### getEventType

          public DistributedObjectEvent.EventType getEventType()

      Returns the type of this event; one of `DistributedObjectEvent.EventType.CREATED` or `DistributedObjectEvent.EventType.DESTROYED`.
      Returns:
        The type of this event `DistributedObjectEvent.EventType`.

    - #### getObjectId

          public Object getObjectId()

      Deprecated. since 3.5. Please use `getObjectName()` instead.
      Returns the identifier of related DistributedObject.
      Returns:
        the identifier of DistributedObject

    - #### getObjectName

          public Object getObjectName()

      Returns the name of related DistributedObject.
      Returns:
        the name of DistributedObject
      See Also:
        `DistributedObject.getName()`

    - #### getDistributedObject

          public DistributedObject getDistributedObject()

      Returns the DistributedObject instance.
      Returns:
        the DistributedObject instance
      Throws:
        `DistributedObjectDestroyedException` - if distributed object is destroyed.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2019. All rights reserved.