Class SequenceUpdater.SyssequenceUpdater
java.lang.Object
org.apache.derby.impl.sql.catalog.SequenceUpdater
org.apache.derby.impl.sql.catalog.SequenceUpdater.SyssequenceUpdater
- All Implemented Interfaces:
Cacheable
- Enclosing class:
SequenceUpdater
Specific implementation of SequenceUpdater for the sequences managed by SYSSEQUENCES.
-
Nested Class Summary
Nested classes/interfaces inherited from class SequenceUpdater
SequenceUpdater.BulkInsertUpdater, SequenceUpdater.SyssequenceUpdater -
Field Summary
FieldsFields inherited from class SequenceUpdater
_dd, _sequenceGenerator, _uuidString -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SequenceGeneratorcreateSequenceGenerator(TransactionController readOnlyTC) Initialize the sequence generator.protected booleanupdateCurrentValueOnDisk(TransactionController tc, Long oldValue, Long newValue, boolean wait) Update the sequence value on disk.Methods inherited from class SequenceUpdater
clean, clearIdentity, createIdentity, getBulkInsertUpdater, getCurrentValueAndAdvance, getIdentity, isDirty, makePreallocator, peekAtCurrentValue, reset, setIdentity, updateCurrentValueOnDisk
-
Field Details
-
_sequenceRowLocation
-
-
Constructor Details
-
SyssequenceUpdater
public SyssequenceUpdater() -
SyssequenceUpdater
-
-
Method Details
-
createSequenceGenerator
protected SequenceGenerator createSequenceGenerator(TransactionController readOnlyTC) throws StandardException Description copied from class:SequenceUpdaterInitialize the sequence generator. Work is done inside a read-only subtransaction of the session's execution transaction.
- Specified by:
createSequenceGeneratorin classSequenceUpdater- Throws:
StandardException
-
updateCurrentValueOnDisk
protected boolean updateCurrentValueOnDisk(TransactionController tc, Long oldValue, Long newValue, boolean wait) throws StandardException Description copied from class:SequenceUpdaterUpdate the sequence value on disk. This method does its work in a subtransaction of the user's execution transaction.
- Specified by:
updateCurrentValueOnDiskin classSequenceUpdater- Parameters:
tc- The transaction to useoldValue- Expected value on disk for this sequencenewValue- The value to poke into the system table backing this sequencewait- Whether to wait for a lock- Returns:
- Returns true if the value was successfully updated, false if we lost a race with another session.
- Throws:
StandardException- May throw an exception if a lock can't be obtained.
-