|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.lib.PBindingImpl
org.objectweb.jorm.facility.naming.generator.LongGenIncr
Implements a long generator (LongGen) that produces new long ID merely by incrementing a persistent long variable.
Field Summary |
Fields inherited from class org.objectweb.jorm.lib.PBindingImpl |
pClassMapping, pname, status |
Fields inherited from interface org.objectweb.jorm.api.PBinding |
ACTION_BIND, ACTION_EXIST, ACTION_EXPORT, ACTION_READ, ACTION_UNBIND, ACTION_UNEXPORT, ACTION_WRITE, LIFECYCLE_ACTIVEFORIO, LIFECYCLE_DELTOWRITE, LIFECYCLE_ERROR, LIFECYCLE_NEWTOWRITE, LIFECYCLE_NOTBOUND |
Constructor Summary | |
LongGenIncr()
|
Method Summary | |
long |
allocateIds(int allocate)
Allocate a range of ids. |
long |
current()
return the id that will be assigned next time. |
long |
genId()
Generates a new long identifier. |
long |
genId(java.lang.Object conn)
|
int |
getIncrement()
|
java.lang.Object |
getMemoryInstance()
It returns the memory instance within which the persistent variables are defined. |
void |
init(java.lang.String name,
PClassMapping pcm,
LongGenMgr mgr)
Initializes this long generator. |
long |
paGetNextId()
nextId getter. |
void |
paSetNextId(long val)
nextId setter. |
void |
setIncrement(int incr)
|
Methods inherited from class org.objectweb.jorm.lib.PBindingImpl |
bind, exist, export, export, getPClassMapping, getPName, getStatus, init, read, read, read, setPName, setStatus, unbind, unexport, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LongGenIncr()
Method Detail |
public void init(java.lang.String name, PClassMapping pcm, LongGenMgr mgr) throws PException
init
in interface PLongGen
name
- The name identifier associated with this long generator.pcm
- The associated PClassMapping.mgr
- The manager associated with this generator.
PException
public long genId() throws PException
genId
in interface LongGen
PException
public long genId(java.lang.Object conn) throws PException
genId
in interface LongGen
PException
public long allocateIds(int allocate) throws PException
LongGen
allocateIds
in interface LongGen
allocate
-
PException
public void setIncrement(int incr)
setIncrement
in interface LongGen
public int getIncrement()
getIncrement
in interface LongGen
public long current()
LongGen
current
in interface LongGen
public java.lang.Object getMemoryInstance()
getMemoryInstance
in interface PAccessor
public long paGetNextId()
public void paSetNextId(long val)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |