org.objectweb.jorm.facility.naming.generator
Class LongGenIncr
org.objectweb.jorm.facility.naming.generator.LongGenIncr
- All Implemented Interfaces:
- LongGen, PAccessor, PBinding
- public abstract class LongGenIncr
- implements LongGen, PAccessor, PBinding
Implements a long generator (LongGen) that produces new long ID merely by
incrementing a persistent long variable.
- Author:
- P. D?chamboux
| 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 |
|
Method Summary |
long |
genId()
Generates a new long identifier. |
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. |
| Methods inherited from interface org.objectweb.jorm.api.PBinding |
bind, exist, export, export, getPClassMapping, getPName, getStatus, init, read, unbind, unexport, write |
LongGenIncr
public LongGenIncr()
init
public void init(java.lang.String name,
PClassMapping pcm,
LongGenMgr mgr)
throws PException
- Initializes this long generator. Verifies if it already exists and if
not, creates it.
- Specified by:
init in interface LongGen
- Parameters:
name - The name identifier associated with this long generator.pcm - The associated PClassMapping.mgr - The manager associated with this generator.
genId
public long genId()
throws PException
- Generates a new long identifier.
- Specified by:
genId in interface LongGen
- Returns:
- The new identifier.
getMemoryInstance
public java.lang.Object getMemoryInstance()
- It returns the memory instance within which the persistent variables are
defined.
- Specified by:
getMemoryInstance in interface PAccessor
- Returns:
- The actual object containing memory persistent variables.
paGetNextId
public long paGetNextId()
- nextId getter.
paSetNextId
public void paSetNextId(long val)
- nextId setter.