com.hazelcast.impl
Class FactoryImpl.IdGeneratorProxy
java.lang.Object
com.hazelcast.impl.base.FactoryAwareNamedProxy
com.hazelcast.impl.FactoryImpl.IdGeneratorProxy
- All Implemented Interfaces:
- HazelcastInstanceAware, IdGenerator, Instance, HazelcastInstanceAwareInstance, DataSerializable, java.io.Serializable
- Enclosing class:
- FactoryImpl
public static class FactoryImpl.IdGeneratorProxy
- extends com.hazelcast.impl.base.FactoryAwareNamedProxy
- implements IdGenerator, DataSerializable
- See Also:
- Serialized Form
Fields inherited from class com.hazelcast.impl.base.FactoryAwareNamedProxy |
factory, name |
Method Summary |
void |
destroy()
Destroys this instance cluster-wide. |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
getId()
Returns the unique id for this instance. |
Instance.InstanceType |
getInstanceType()
Returns instance type such as map, set, list, lock, topic, multimap, id generator |
java.lang.String |
getName()
Returns the name of this Id Generator instance. |
int |
hashCode()
|
long |
newId()
Generates and returns cluster-wide unique id. |
java.lang.String |
toString()
|
Methods inherited from class com.hazelcast.impl.base.FactoryAwareNamedProxy |
getFactory, readData, setHazelcastInstance, setName, writeData |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
FactoryImpl.IdGeneratorProxy
public FactoryImpl.IdGeneratorProxy()
FactoryImpl.IdGeneratorProxy
public FactoryImpl.IdGeneratorProxy(java.lang.String name,
FactoryImpl factory)
getId
public java.lang.Object getId()
- Description copied from interface:
Instance
- Returns the unique id for this instance.
- Specified by:
getId
in interface Instance
- Returns:
- id the of this instance
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
getInstanceType
public Instance.InstanceType getInstanceType()
- Description copied from interface:
Instance
- Returns instance type such as map, set, list, lock, topic, multimap, id generator
- Specified by:
getInstanceType
in interface Instance
- Returns:
- instance type
destroy
public void destroy()
- Description copied from interface:
Instance
- Destroys this instance cluster-wide.
Clears and releases all resources for this instance.
- Specified by:
destroy
in interface Instance
getName
public java.lang.String getName()
- Description copied from interface:
IdGenerator
- Returns the name of this Id Generator instance.
- Specified by:
getName
in interface IdGenerator
- Overrides:
getName
in class com.hazelcast.impl.base.FactoryAwareNamedProxy
- Returns:
- name of this id generator instance
newId
public long newId()
- Description copied from interface:
IdGenerator
- Generates and returns cluster-wide unique id.
Generated ids are guaranteed to be unique for the entire cluster
as long as the cluster is live. If the cluster restarts then
id generation will start from 0.
- Specified by:
newId
in interface IdGenerator
- Returns:
- cluster-wide new unique id
Copyright © 2012 Hazel Bilisim Ltd.. All Rights Reserved.