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
public static final class SequenceUpdater.SyssequenceUpdater extends 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
Fields Modifier and Type Field Description private RowLocation_sequenceRowLocation-
Fields inherited from class org.apache.derby.impl.sql.catalog.SequenceUpdater
_dd, _sequenceGenerator, _uuidString
-
-
Constructor Summary
Constructors Constructor Description SyssequenceUpdater()SyssequenceUpdater(DataDictionaryImpl dd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SequenceGeneratorcreateSequenceGenerator(TransactionController readOnlyTC)Initialize the sequence generator.protected booleanupdateCurrentValueOnDisk(TransactionController tc, java.lang.Long oldValue, java.lang.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 Detail
-
_sequenceRowLocation
private RowLocation _sequenceRowLocation
-
-
Constructor Detail
-
SyssequenceUpdater
public SyssequenceUpdater()
-
SyssequenceUpdater
public SyssequenceUpdater(DataDictionaryImpl dd)
-
-
Method Detail
-
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, java.lang.Long oldValue, java.lang.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.
-
-