Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 4.3.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.db
Class SequenceConfig

    java.lang.Object
      com.sleepycat.db.SequenceConfig

All Implemented Interfaces:
  Cloneable

public class SequenceConfig
extends Object
implements Cloneable

Specify the attributes of a sequence.

Field Summary
`static SequenceConfig` | `DEFAULT`

Constructor Summary
`SequenceConfig()` An instance created using the default constructor is initialized with the system's default settings.

Method Summary
`boolean` | `getAllowCreate()` Return if the `Database.openSequence` method is configured to create the sequence if it does not already exist.
`boolean` | `getAutoCommitNoSync()` Return if the auto-commit operations on the sequence are configure to not flush the transaction log..
`int` | `getCacheSize()` Return the number of elements cached by a sequence handle..
`boolean` | `getDecrement()` Return if the sequence is configured to decrement.
`boolean` | `getExclusiveCreate()` Return if the `Database.openSequence` method is configured to fail if the database already exists.
`long` | `getInitialValue()` Return the initial value for a sequence..
`long` | `getRangeMax()` Return the maximum value for the sequence.
`long` | `getRangeMin()` Return the minimum value for the sequence.
`boolean` | `getWrap()` Return if the sequence will wrap around when it is incremented (decremented) past the specified maximum (minimum) value.
`void` | `setAllowCreate(boolean allowCreate)` Configure the `Database.openSequence` method to create the sequence if it does not already exist.
`void` | `setAutoCommitNoSync(boolean autoCommitNoSync)` Configure auto-commit operations on the sequence to not flush the transaction log.
`void` | `setCacheSize(int cacheSize)` Set the Configure the number of elements cached by a sequence handle.
`void` | `setDecrement(boolean decrement)` Specify that the sequence should be decremented.
`void` | `setExclusiveCreate(boolean exclusiveCreate)` Configure the `Database.openSequence` method to fail if the database already exists.
`void` | `setInitialValue(long initialValue)` Set the Set the initial value for a sequence.
`void` | `setRange(long min, long max)` Configure a sequence range.
`void` | `setWrap(boolean wrap)` Specify that the sequence should wrap around when it is incremented (decremented) past the specified maximum (minimum) value.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT

    public static final SequenceConfig DEFAULT

Constructor Detail

### SequenceConfig

    public SequenceConfig()

  An instance created using the default constructor is initialized with the system's default settings.

Method Detail

### setAllowCreate

    public void setAllowCreate(boolean allowCreate)

  Configure the `Database.openSequence` method to create the sequence if it does not already exist.

  This method may be called at any time during the life of the application.

  Parameters:
    `allowCreate` - If true, configure the `Database.openSequence` method to create the sequence if it does not already exist.

### getAllowCreate

    public boolean getAllowCreate()

  Return if the `Database.openSequence` method is configured to create the sequence if it does not already exist.

  This method may be called at any time during the life of the application.

  Returns:
    If the `Database.openSequence` method is configured to create the sequence if it does not already exist.

### setAutoCommitNoSync

    public void setAutoCommitNoSync(boolean autoCommitNoSync)

  Configure auto-commit operations on the sequence to not flush the transaction log.

  This method may be called at any time during the life of the application.

  Parameters:
    `autoCommitNoSync` - If true, configure auto-commit operations on the sequence to not flush the transaction log.

### getAutoCommitNoSync

    public boolean getAutoCommitNoSync()

  Return if the auto-commit operations on the sequence are configure to not flush the transaction log..

  This method may be called at any time during the life of the application.

  Returns:
    If the auto-commit operations on the sequence are configure to not flush the transaction log..

### setCacheSize

    public void setCacheSize(int cacheSize)

  Set the Configure the number of elements cached by a sequence handle.

  This method may be called at any time during the life of the application.

  Parameters:
    `cacheSize` - The Configure the number of elements cached by a sequence handle.

### getCacheSize

    public int getCacheSize()

  Return the number of elements cached by a sequence handle..

  This method may be called at any time during the life of the application.

  Returns:
    The number of elements cached by a sequence handle..

### setDecrement

    public void setDecrement(boolean decrement)

  Specify that the sequence should be decremented.

  This method may be called at any time during the life of the application.

  Parameters:
    `decrement` - If true, specify that the sequence should be decremented.

### getDecrement

    public boolean getDecrement()

  Return if the sequence is configured to decrement.

  This method may be called at any time during the life of the application.

  Returns:
    If the sequence is configured to decrement.

### setExclusiveCreate

    public void setExclusiveCreate(boolean exclusiveCreate)

  Configure the `Database.openSequence` method to fail if the database already exists.

  This method may be called at any time during the life of the application.

  Parameters:
    `exclusiveCreate` - If true, configure the `Database.openSequence` method to fail if the database already exists.

### getExclusiveCreate

    public boolean getExclusiveCreate()

  Return if the `Database.openSequence` method is configured to fail if the database already exists.

  This method may be called at any time during the life of the application.

  Returns:
    If the `Database.openSequence` method is configured to fail if the database already exists.

### setInitialValue

    public void setInitialValue(long initialValue)

  Set the Set the initial value for a sequence.

  This call is only effective when the sequence is being created.

  This method may be called at any time during the life of the application.

  Parameters:
    `initialValue` - The Set the initial value for a sequence.

### getInitialValue

    public long getInitialValue()

  Return the initial value for a sequence..

  This method may be called at any time during the life of the application.

  Returns:
    The initial value for a sequence..

### setRange

    public void setRange(long min,
                         long max)

  Configure a sequence range. This call is only effective when the sequence is being created.

  Parameters:
    `min` - The minimum value for the sequence.
    `max` - The maximum value for the sequence.

### getRangeMin

    public long getRangeMin()

  Return the minimum value for the sequence.

  This method may be called at any time during the life of the application.

  Returns:
    The minimum value for the sequence.

### getRangeMax

    public long getRangeMax()

  Return the maximum value for the sequence.

  This method may be called at any time during the life of the application.

  Returns:
    The maximum value for the sequence.

### setWrap

    public void setWrap(boolean wrap)

  Specify that the sequence should wrap around when it is incremented (decremented) past the specified maximum (minimum) value.

  This method may be called at any time during the life of the application.

  Parameters:
    `wrap` - If true, specify that the sequence should wrap around when it is incremented (decremented) past the specified maximum (minimum) value.

### getWrap

    public boolean getWrap()

  Return if the sequence will wrap around when it is incremented (decremented) past the specified maximum (minimum) value.

  This method may be called at any time during the life of the application.

  Returns:
    If the sequence will wrap around when it is incremented (decremented) past the specified maximum (minimum) value.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB version 4.3.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.