|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.lyophil.memory.MemIdentifierSource
A long number source that keeps them in memory.
Field Summary | |
private long |
counter
|
private java.lang.Object |
guard
synchronization guard for the counter. |
private static long |
LASTID
|
Fields inherited from interface net.walend.lyophil.IdentifierSource |
ROLE |
Constructor Summary | |
MemIdentifierSource()
|
Method Summary | |
boolean |
checkSetUp()
make sure the backing storage is set up correctly |
java.io.Serializable |
createID()
Return a Long unique in the system, which better not be bigger than a single VM. |
java.io.Serializable |
peekNextID()
Returns the next id to be created, without assigning it as in use. |
void |
setUp()
set up the backing storage |
void |
tearDown()
clean up the backing storage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final java.lang.Object guard
private long counter
private static final long LASTID
Constructor Detail |
public MemIdentifierSource()
Method Detail |
public boolean checkSetUp()
IdentifierSource
checkSetUp
in interface IdentifierSource
public void setUp()
IdentifierSource
setUp
in interface IdentifierSource
public void tearDown()
IdentifierSource
tearDown
in interface IdentifierSource
public java.io.Serializable peekNextID()
IdentifierSource
peekNextID
in interface IdentifierSource
public java.io.Serializable createID()
createID
in interface IdentifierSource
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |