Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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`

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

### getCacheSize

    public 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.

### getCurrent

    public 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

    public 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()`

### getNext

    public 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`

### getSequenceName

    public String getSequenceName()

  Deprecated.
  Returns the name of the sequence that is managed by this sequencer.

  Returns:
    The sequence name.

### getSequencerName

    public String getSequencerName()

  Deprecated.
  Returns the name of this sequencer.

  Returns:
    The sequencer name.

### getStepSize

    public 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.

### setCacheSize

    public 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.

### setIncrementAmount

    public 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)`

### setSequenceName

    public void setSequenceName(String sequenceName)

  Deprecated.
  Sets the name of the sequence that is managed by this sequencer.

  Parameters:
    `sequenceName` - The new sequence name.

### setSequencerName

    public void setSequencerName(String sequencerName)

  Deprecated.
  Sets the name of this sequencer.

  Parameters:
    `sequencerName` - The new sequencer name.

### setStepSize

    public 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2005 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 BEA Systems, Inc. All Rights Reserved