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 org.apache.derby.impl.sql.catalog.SequenceUpdater
SequenceUpdater.BulkInsertUpdater, SequenceUpdater.SyssequenceUpdater
-
Field Summary
FieldsFields inherited from class org.apache.derby.impl.sql.catalog.SequenceUpdater
_dd, _sequenceGenerator, _uuidString
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SequenceGenerator
createSequenceGenerator
(TransactionController readOnlyTC) Initialize the sequence generator.protected boolean
updateCurrentValueOnDisk
(TransactionController tc, Long oldValue, Long newValue, boolean wait) Update the sequence value on disk.Methods inherited from class org.apache.derby.impl.sql.catalog.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:SequenceUpdater
Initialize the sequence generator. Work is done inside a read-only subtransaction of the session's execution transaction.
- Specified by:
createSequenceGenerator
in classSequenceUpdater
- Throws:
StandardException
-
updateCurrentValueOnDisk
protected boolean updateCurrentValueOnDisk(TransactionController tc, Long oldValue, Long newValue, boolean wait) throws StandardException Description copied from class:SequenceUpdater
Update the sequence value on disk. This method does its work in a subtransaction of the user's execution transaction.
- Specified by:
updateCurrentValueOnDisk
in 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.
-