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

## com.sleepycat.je
Class SequenceConfig

    java.lang.Object
      com.sleepycat.je.SequenceConfig

    public class SequenceConfig

extends Object

Specifies the attributes of a sequence.

Field Summary
`static SequenceConfig` | `DEFAULT` Default configuration used if null is passed to methods that create a cursor.

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

Method Summary
`boolean` | `getAllowCreate()` Returns true if the `Database.openSequence` method is configured to create the sequence if it does not already exist.
`boolean` | `getAutoCommitNoSync()` Returns true if the auto-commit operations on the sequence are configure to not flush the transaction log..
`int` | `getCacheSize()` Returns the number of elements cached by a sequence handle..
`boolean` | `getDecrement()` Returns true if the sequence is configured to decrement.
`boolean` | `getExclusiveCreate()` Returns true if the `Database.openSequence` method is configured to fail if the database already exists.
`long` | `getInitialValue()` Returns the initial value for a sequence..
`long` | `getRangeMax()` Returns the maximum value for the sequence.
`long` | `getRangeMin()` Returns the minimum value for the sequence.
`boolean` | `getWrap()` Returns true if the sequence will wrap around when it is incremented (decremented) past the specified maximum (minimum) value.
`void` | `setAllowCreate(boolean allowCreate)` Configures the `Database.openSequence` method to create the sequence if it does not already exist.
`void` | `setAutoCommitNoSync(boolean autoCommitNoSync)` Configures 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)` Specifies that the sequence should be decremented.
`void` | `setExclusiveCreate(boolean exclusiveCreate)` Configures the `Database.openSequence` method to fail if the database already exists.
`void` | `setInitialValue(long initialValue)` Sets the initial value for a sequence.
`void` | `setRange(long min, long max)` Configures a sequence range.
`void` | `setWrap(boolean wrap)` Specifies that the sequence should wrap around when it is incremented (decremented) past the specified maximum (minimum) value.
`String` | `toString()` Returns the values for each configuration attribute.

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

Field Detail

### DEFAULT

    public static final SequenceConfig DEFAULT

  Default configuration used if null is passed to methods that create a cursor.

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)

  Configures 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()

  Returns true 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:
    True if the `Database.openSequence` method is configured to create the sequence if it does not already exist.

### 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()

  Returns 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)

  Specifies 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()

  Returns true if the sequence is configured to decrement.

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

  Returns:
    True if the sequence is configured to decrement.

### setExclusiveCreate

    public void setExclusiveCreate(boolean exclusiveCreate)

  Configures 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()

  Returns true 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:
    True if the `Database.openSequence` method is configured to fail if the database already exists.

### setInitialValue

    public void setInitialValue(long initialValue)

  Sets 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()

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

### setAutoCommitNoSync

    public void setAutoCommitNoSync(boolean autoCommitNoSync)

  Configures 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()

  Returns true 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:
    True if the auto-commit operations on the sequence are configure to not flush the transaction log..

### setRange

    public void setRange(long min,
                         long max)

  Configures 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()

  Returns 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()

  Returns 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)

  Specifies 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()

  Returns true 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:
    True if the sequence will wrap around when it is incremented (decremented) past the specified maximum (minimum) value.

### toString

    public String toString()

  Returns the values for each configuration attribute.

  Overrides:
    `toString` in class `Object`
  Returns:
    the values for each configuration attribute.

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

Copyright (c) 2004,2008 Oracle. All rights reserved.