| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|
com.newstep.solid.persistence.db
|
Class OracleSequencePooler
|
All Implemented Interfaces:
Serializable
public class OracleSequencePooler
Uses a mixed sequence/cache mechanism, mapping
a sequence to a member integer.
Oracle specific dialect support.
which pools a single integer sequence, with the intention
that the sequence is greater than 1.
Initializes itself based on 2 calls to get next value
of a sequence, calculates the synchronization increment.
This resynchronizes when the sequence increment
limit has been reached. eg. If sequence starts with X
and increment is I, then for synchonization will occur
for every X + nI.
It is not useful to use this implementation with sequences
of increment 1, since the synchronization will occur on every
attempt to get the next id.
This class is thread safe in so far as synchronization
for incremental operations of the current id.
Author:
msimonsen
Implements:
Serializable
Links:
Kernel Association Association Link
Associates type:
association
Client cardinality:
1
Client navigability:
NOT NAVIGABLE
Client visibility:
private
Supplier cardinality:
1
Supplier navigability:
NAVIGABLE
Supplier visibility:
private
| Field Summary |
private int |
|
private int |
|
private boolean |
|
private final ReentrantLock |
|
private static Logger |
|
|
|
private final static long |
|
private int |
|
private String |
|
| Constructor Summary |
public void |
|
| Method Summary |
private int |
|
public int |
|
public int |
|
protected synchronized int |
|
private int curPointer
Multiplicity:
1
private int increment
Multiplicity:
1
private boolean initialized
Multiplicity:
1
private final ReentrantLock lock
Final.
Multiplicity:
1
private static Logger logger
Multiplicity:
1
Static.
Multiplicity:
1
private final static long serialVersionUID
Final.
Multiplicity:
1
Static.
private int startVal
Multiplicity:
1
private String uid
Multiplicity:
1
public void OracleSequencePooler ()
Stereotype:
create
Throws:
PersistenceException
Throws:
PersistenceException
Throws:
PersistenceException
protected synchronized int init (Transaction tx, String seqName)
Synchronized.
Throws:
PersistenceException
| | | | SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
|
|