Package com.hazelcast.core
Interface DistributedObject
- All Known Subinterfaces:
BaseMap<K,
,V> BaseQueue<E>
,CPMap<K,
,V> FencedLock
,FlakeIdGenerator
,IAtomicLong
,IAtomicReference<E>
,ICollection<E>
,ICountDownLatch
,IExecutorService
,IList<E>
,IMap<K,
,V> IQueue<E>
,IScheduledExecutorService
,ISemaphore
,ITopic<E>
,PNCounter
,ReplicatedMap<K,
,V> Ringbuffer<E>
public interface DistributedObject
Base interface for all distributed objects.
All distributed objects are not garbage collectable unless destroy()
is called first.
Note: Failure to destroy after you are done using a distributed object will lead to memory leaks.
- See Also:
-
Method Details
-
getPartitionKey
String getPartitionKey()Returns the key of the partition that this DistributedObject is assigned to. The returned value only has meaning for a non-partitioned data structure like anIAtomicLong
. For a partitioned data structure like an {IMap}, the returned value will not be null, but otherwise undefined.- Returns:
- the partition key.
-
getName
String getName()Returns the unique name for this DistributedObject. The returned value will never be null.- Returns:
- the unique name for this object.
-
getServiceName
String getServiceName()Returns the service name for this object.- Returns:
- the service name for this object.
-
destroy
void destroy()Destroys this object cluster-wide. Clears and releases all resources for this object.
-