Class SequenceConfig
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SequenceConfigDefault configuration used if null is passed to methods that create a cursor. -
Constructor Summary
ConstructorsConstructorDescriptionAn instance created using the default constructor is initialized with the system's default settings. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if theDatabase.openSequencemethod is configured to create the sequence if it does not already exist.booleanReturn true if the auto-commit operations on the sequence are configure to not flush the transaction log..intReturn the number of elements cached by a sequence handle..booleanReturn true if the sequence is configured to decrement.booleanReturn true if theDatabase.openSequencemethod is configured to fail if the database already exists.longReturn the initial value for a sequence..longReturn the maximum value for the sequence.longReturn the minimum value for the sequence.booleangetWrap()Return true if the sequence will wrap around when it is incremented (decremented) past the specified maximum (minimum) value.voidsetAllowCreate(boolean allowCreate) Configure theDatabase.openSequencemethod to create the sequence if it does not already exist.voidsetAutoCommitNoSync(boolean autoCommitNoSync) Configure auto-commit operations on the sequence to not flush the transaction log.voidsetCacheSize(int cacheSize) Set the Configure the number of elements cached by a sequence handle.voidsetDecrement(boolean decrement) Specify that the sequence should be decremented.voidsetExclusiveCreate(boolean exclusiveCreate) Configure theDatabase.openSequencemethod to fail if the database already exists.voidsetInitialValue(long initialValue) Set the Set the initial value for a sequence.voidsetRange(long min, long max) Configure a sequence range.voidsetWrap(boolean wrap) Specify that the sequence should wrap around when it is incremented (decremented) past the specified maximum (minimum) value.
-
Field Details
-
DEFAULT
Default configuration used if null is passed to methods that create a cursor.
-
-
Constructor Details
-
SequenceConfig
public SequenceConfig()An instance created using the default constructor is initialized with the system's default settings.
-
-
Method Details
-
setAllowCreate
public void setAllowCreate(boolean allowCreate) Configure theDatabase.openSequencemethod 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 theDatabase.openSequencemethod to create the sequence if it does not already exist.
-
getAllowCreate
public boolean getAllowCreate()Return true if theDatabase.openSequencemethod 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.openSequencemethod 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()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 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) Configure theDatabase.openSequencemethod 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 theDatabase.openSequencemethod to fail if the database already exists.
-
getExclusiveCreate
public boolean getExclusiveCreate()Return true if theDatabase.openSequencemethod 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.openSequencemethod 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..
-
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 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) 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 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.
-