com.beasys.commerce.util
Interface Sequencer

All Known Implementing Classes:
JDBCSequencer

Deprecated Use com.bea.p13n.util.jdbc.Sequencer and com.bea.p13n.util.jdbc.SequencerFactory

@Deprecated
public interface Sequencer

This file contains an interface for a unique number sequencer. A sequencer can be used to generate a sequence of unique long numbers.

See Also
Sequencer, SequencerFactory

Method Summary
 long getCacheSize()
          Deprecated Returns the cache size.
 long getCurrent(Connection databaseConnection)
          Deprecated Gets the current sequence number associated with this sequencer.
 long getIncrementAmount()
          Deprecated Replaced by getCacheSize
 long getNext(Connection databaseConnection)
          Deprecated Gets the next sequence number using the supplied database connection.
 String getSequenceName()
          Deprecated Returns the name of the sequence that is managed by this sequencer.
 String getSequencerName()
          Deprecated Returns the name of this sequencer.
 long getStepSize()
          Deprecated Returns the step size.
 void setCacheSize(long cacheSize)
          Deprecated Sets the cache size.
 void setIncrementAmount(long incrementAmount)
          Deprecated Replaced by setCacheSize
 void setSequenceName(String sequenceName)
          Deprecated Sets the name of the sequence that is managed by this sequencer.
 void setSequencerName(String sequencerName)
          Deprecated Sets the name of this sequencer.
 void setStepSize(long stepSize)
          Deprecated Sets the step size.
 

Method Detail

getNext

long getNext(Connection databaseConnection)
             throws SQLException
Deprecated 
Gets the next sequence number using the supplied database connection.

Parameters
databaseConnection - The database connection used to generate the next sequence number.
Throws
SQLException - on error.
SQLException

getCurrent

long getCurrent(Connection databaseConnection)
                throws SQLException
Deprecated 
Gets the current sequence number associated with this sequencer.

Parameters
databaseConnection - The database connection used to generate the next sequence number.
Throws
SQLException - on error.
SQLException

getIncrementAmount

long getIncrementAmount()
Deprecated Replaced by getCacheSize

Returns the increment amount. The increment amount defines how often the sequencer will allocate a block of unique sequence numbers from the database. When the sequencer exhausts its supplied of allocated numbers, it will allocate a new sequence of numbers from the database.

Returns
The increment amount.
See Also
getCacheSize()

setIncrementAmount

void setIncrementAmount(long incrementAmount)
Deprecated Replaced by setCacheSize

Sets the increment amount. The increment amount defines how often the sequencer will allocate a block of unique sequence numbers from the database. When the sequencer exhausts its supplied of allocated numbers, it will allocate a new sequence of numbers from the database.

Parameters
incrementAmount - The increment amount.
See Also
setCacheSize(long)

getCacheSize

long getCacheSize()
Deprecated 
Returns the cache size. The cache size defines how often the sequencer will allocate a block of unique sequence numbers from the database. When the sequencer exhausts its supplied of allocated numbers, it will allocate a new sequence of numbers from the database.

Returns
The cache size.

setCacheSize

void setCacheSize(long cacheSize)
Deprecated 
Sets the cache size. The cache size defines how often the sequencer will allocate a block of unique sequence numbers from the database. When the sequencer exhausts its supplied of allocated numbers, it will allocate a new sequence of numbers from the database.

Parameters
cacheSize - The cache size.

getStepSize

long getStepSize()
Deprecated 
Returns the step size. The step size determines the difference between the values returned from successive calls to getNext().

Returns
The step size.

setStepSize

void setStepSize(long stepSize)
Deprecated 
Sets the step size. The step size determines the difference between the values returned from successive calls to getNext().

Parameters
stepSize - The step size.

getSequencerName

String getSequencerName()
Deprecated 
Returns the name of this sequencer.

Returns
The sequencer name.

setSequencerName

void setSequencerName(String sequencerName)
Deprecated 
Sets the name of this sequencer.

Parameters
sequencerName - The new sequencer name.

getSequenceName

String getSequenceName()
Deprecated 
Returns the name of the sequence that is managed by this sequencer.

Returns
The sequence name.

setSequenceName

void setSequenceName(String sequenceName)
Deprecated 
Sets the name of the sequence that is managed by this sequencer.

Parameters
sequenceName - The new sequence name.


Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.