Modifier and Type | Field and Description |
---|---|
static SequenceConfig |
DEFAULT
Default configuration used if null is passed to methods that create a
cursor.
|
Constructor and Description |
---|
SequenceConfig()
An instance created using the default constructor is initialized with
the system's default settings.
|
Modifier and Type | Method and Description |
---|---|
SequenceConfig |
clone()
Returns a copy of this configuration object.
|
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.
|
SequenceConfig |
setAllowCreate(boolean allowCreate)
Configures the
Database.openSequence method to create the sequence if it does not
already exist. |
void |
setAllowCreateVoid(boolean allowCreate) |
SequenceConfig |
setAutoCommitNoSync(boolean autoCommitNoSync)
Configures auto-commit operations on the sequence to not flush the
transaction log.
|
void |
setAutoCommitNoSyncVoid(boolean autoCommitNoSync) |
SequenceConfig |
setCacheSize(int cacheSize)
Set the Configure the number of elements cached by a sequence handle.
|
void |
setCacheSizeVoid(int cacheSize) |
SequenceConfig |
setDecrement(boolean decrement)
Specifies that the sequence should be decremented.
|
void |
setDecrementVoid(boolean decrement) |
SequenceConfig |
setExclusiveCreate(boolean exclusiveCreate)
Configures the
Database.openSequence method to fail if the database already exists. |
void |
setExclusiveCreateVoid(boolean exclusiveCreate) |
SequenceConfig |
setInitialValue(long initialValue)
Sets the initial value for a sequence.
|
void |
setInitialValueVoid(long initialValue) |
SequenceConfig |
setRange(long min,
long max)
Configures a sequence range.
|
SequenceConfig |
setRangeMax(long max) |
void |
setRangeMaxVoid(long max) |
SequenceConfig |
setRangeMin(long min) |
void |
setRangeMinVoid(long min) |
SequenceConfig |
setWrap(boolean wrap)
Specifies that the sequence should wrap around when it is incremented
(decremented) past the specified maximum (minimum) value.
|
void |
setWrapVoid(boolean wrap) |
String |
toString()
Returns the values for each configuration attribute.
|
public static final SequenceConfig DEFAULT
public SequenceConfig()
public SequenceConfig setAllowCreate(boolean allowCreate)
Database.openSequence
method to create the sequence if it does not
already exist.
The default value is false.
This method may be called at any time during the life of the application.
allowCreate
- If true, configure the Database.openSequence
method to
create the sequence if it does not already exist.public void setAllowCreateVoid(boolean allowCreate)
public boolean getAllowCreate()
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.
Database.openSequence
method is configured to create the sequence if it
does not already exist.public SequenceConfig setCacheSize(int cacheSize)
The default value is zero.
This method may be called at any time during the life of the application.
cacheSize
- The number of elements cached by a sequence handle.
May not be larger than the size of the range defined by setRange(long, long)
.public void setCacheSizeVoid(int cacheSize)
public int getCacheSize()
This method may be called at any time during the life of the application.
public SequenceConfig setDecrement(boolean decrement)
The default value is false.
This method may be called at any time during the life of the application.
decrement
- If true, specify that the sequence should be
decremented.public void setDecrementVoid(boolean decrement)
public boolean getDecrement()
This method may be called at any time during the life of the application.
public SequenceConfig setExclusiveCreate(boolean exclusiveCreate)
Database.openSequence
method to fail if the database already exists.
The default value is false.
This method may be called at any time during the life of the application.
exclusiveCreate
- If true, configure the Database.openSequence
method to
fail if the database already exists.public void setExclusiveCreateVoid(boolean exclusiveCreate)
public boolean getExclusiveCreate()
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.
Database.openSequence
method is configured to fail if the database
already exists.public SequenceConfig setInitialValue(long initialValue)
The default initial value is zero.
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.
initialValue
- The initial value for a sequence. Must be within
the range minimum and maximum values, inclusive.public void setInitialValueVoid(long initialValue)
public long getInitialValue()
This method may be called at any time during the life of the application.
public SequenceConfig setAutoCommitNoSync(boolean autoCommitNoSync)
The default value is false.
This method may be called at any time during the life of the application.
autoCommitNoSync
- If true, configure auto-commit operations on
the sequence to not flush the transaction log.public void setAutoCommitNoSyncVoid(boolean autoCommitNoSync)
public boolean getAutoCommitNoSync()
This method may be called at any time during the life of the application.
public SequenceConfig setRange(long min, long max)
The default minimum is Long.MIN_VALUE
and the default maximum
is Long.MAX_VALUE
.
min
- The minimum value for the sequence. Must be less than max.max
- The maximum value for the sequence. Must be greater than
min.public SequenceConfig setRangeMin(long min)
min
- The minimum value for the sequence. Must be less than max.public void setRangeMinVoid(long min)
public SequenceConfig setRangeMax(long max)
max
- The maximum value for the sequence. Must be greater than
min.public void setRangeMaxVoid(long max)
public long getRangeMin()
This method may be called at any time during the life of the application.
public long getRangeMax()
This method may be called at any time during the life of the application.
public SequenceConfig setWrap(boolean wrap)
The default value is false.
This method may be called at any time during the life of the application.
wrap
- If true, specify that the sequence should wrap around when
it is incremented (decremented) past the specified maximum (minimum)
value.public void setWrapVoid(boolean wrap)
public boolean getWrap()
This method may be called at any time during the life of the application.
public SequenceConfig clone()
Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.