com.hazelcast.spi
Class AbstractDistributedObject<S extends RemoteService>

java.lang.Object
  extended by com.hazelcast.spi.AbstractDistributedObject<S>
All Implemented Interfaces:
DistributedObject

public abstract class AbstractDistributedObject<S extends RemoteService>
extends Object
implements DistributedObject


Field Summary
protected static PartitioningStrategy PARTITIONING_STRATEGY
           
 
Constructor Summary
protected AbstractDistributedObject(NodeEngine nodeEngine, S service)
           
 
Method Summary
 void destroy()
          Destroys this object cluster-wide.
 boolean equals(Object o)
           
 Object getId()
          Deprecated. 
protected  Data getNameAsPartitionAwareData()
           
 NodeEngine getNodeEngine()
           
 String getPartitionKey()
          Returns the key of partition this DistributedObject is assigned to.
 S getService()
           
abstract  String getServiceName()
          Returns the service name for this object.
 int hashCode()
           
protected  void postDestroy()
           
protected  RuntimeException throwNotActiveException()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hazelcast.core.DistributedObject
getName
 

Field Detail

PARTITIONING_STRATEGY

protected static final PartitioningStrategy PARTITIONING_STRATEGY
Constructor Detail

AbstractDistributedObject

protected AbstractDistributedObject(NodeEngine nodeEngine,
                                    S service)
Method Detail

getNameAsPartitionAwareData

protected Data getNameAsPartitionAwareData()

getPartitionKey

public String getPartitionKey()
Description copied from interface: DistributedObject
Returns the key of partition this DistributedObject is assigned to. The returned value only has meaning for a non partitioned data-structure like an IAtomicLong. For a partitioned data-structure like an IMap the returned value will not be null, but otherwise undefined.

Specified by:
getPartitionKey in interface DistributedObject
Returns:
the partition key.

destroy

public final void destroy()
Description copied from interface: DistributedObject
Destroys this object cluster-wide. Clears and releases all resources for this object.

Specified by:
destroy in interface DistributedObject

postDestroy

protected void postDestroy()

getNodeEngine

public final NodeEngine getNodeEngine()

throwNotActiveException

protected RuntimeException throwNotActiveException()

getService

public final S getService()

getServiceName

public abstract String getServiceName()
Description copied from interface: DistributedObject
Returns the service name for this object.

Specified by:
getServiceName in interface DistributedObject

getId

@Deprecated
public final Object getId()
Deprecated. 

Description copied from interface: DistributedObject
Returns the unique id for this object.

Specified by:
getId in interface DistributedObject
Returns:
id the of this instance

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.