org.apache.derby.impl.sql.catalog
Class SequenceUpdater.SyssequenceUpdater

java.lang.Object
  extended by org.apache.derby.impl.sql.catalog.SequenceUpdater
      extended by 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.SyssequenceUpdater
 
Field Summary
private  RowLocation _sequenceRowLocation
           
 
Fields inherited from class org.apache.derby.impl.sql.catalog.SequenceUpdater
_dd, _sequenceGenerator, _uuidString
 
Constructor Summary
SequenceUpdater.SyssequenceUpdater()
           
SequenceUpdater.SyssequenceUpdater(DataDictionaryImpl dd)
           
 
Method Summary
protected  SequenceGenerator createSequenceGenerator(TransactionController readOnlyTC)
           Initialize the sequence generator.
protected  boolean updateCurrentValueOnDisk(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, getCurrentValueAndAdvance, getIdentity, getLockTimeout, isDirty, setIdentity, updateCurrentValueOnDisk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_sequenceRowLocation

private RowLocation _sequenceRowLocation
Constructor Detail

SequenceUpdater.SyssequenceUpdater

public SequenceUpdater.SyssequenceUpdater()

SequenceUpdater.SyssequenceUpdater

public SequenceUpdater.SyssequenceUpdater(DataDictionaryImpl dd)
Method Detail

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 class SequenceUpdater
Throws:
StandardException

updateCurrentValueOnDisk

protected boolean updateCurrentValueOnDisk(TransactionController tc,
                                           java.lang.Long oldValue,
                                           java.lang.Long newValue,
                                           boolean wait)
                                    throws StandardException
Description copied from class: SequenceUpdater

Update the sequence value on disk. This method is first called with a read/write subtransaction of the session's execution transaction. If work can't be done there immediately, this method is called with the session's execution transaction.

Specified by:
updateCurrentValueOnDisk in class SequenceUpdater
Parameters:
tc - The transaction to use
oldValue - Expected value on disk for this sequence
newValue - The value to poke into the system table backing this sequence
wait - 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.

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.