public class SCompactConfig
extends java.lang.Object
SDatabase.compact(com.sleepycat.client.STransaction, com.sleepycat.client.SDatabaseEntry, com.sleepycat.client.SDatabaseEntry, com.sleepycat.client.SDatabaseEntry, com.sleepycat.client.SCompactConfig)
operations.
For a user created instance, no attribute is set by default. In addition, calling the getter method of an unset attribute results in an IllegalStateException. To set an attribute, call the setter method of the attribute.
When used to perform a compaction, system default values are used for unset attributes.
Constructor and Description |
---|
SCompactConfig()
Create an empty SCompactConfig with no attribute set.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
getField(F field)
Return the value set on a specified field.
|
int |
getFillPercent()
Return the the desired fill percentage.
|
boolean |
getFreeListOnly()
Return true if page compaction is skipped.
|
boolean |
getFreeSpace()
Return true if pages are returned to the filesystem.
|
int |
getMaxPages()
Return the maximum number of pages to free.
|
protected T |
getThriftObj() |
int |
getTimeout()
Return the lock timeout set for implicit transactions, in microseconds.
|
SCompactConfig |
setFillPercent(int fillpercent)
Set the desired fill percentage.
|
SCompactConfig |
setFreeListOnly(boolean freeListOnly)
Configure whether to skip page compaction, only returning pages to the
filesystem that are already free and at the end of the file.
|
SCompactConfig |
setFreeSpace(boolean freeSpace)
Return pages to the filesystem if possible.
|
SCompactConfig |
setMaxPages(int maxPages)
Set the maximum number of pages to free.
|
SCompactConfig |
setTimeout(int timeout)
Set the lock timeout for implicit transactions.
|
public SCompactConfig()
public int getFillPercent()
public SCompactConfig setFillPercent(int fillpercent)
fillpercent
- the desired fill percentagepublic boolean getFreeListOnly()
public SCompactConfig setFreeListOnly(boolean freeListOnly)
freeListOnly
- whether to skip page compactionpublic boolean getFreeSpace()
public SCompactConfig setFreeSpace(boolean freeSpace)
freeSpace
- whether to return pages to the filesystempublic int getMaxPages()
public SCompactConfig setMaxPages(int maxPages)
maxPages
- if non-zero, the call will return after that number of
pages have been freedpublic int getTimeout()
public SCompactConfig setTimeout(int timeout)
SDatabase.compact(com.sleepycat.client.STransaction, com.sleepycat.client.SDatabaseEntry, com.sleepycat.client.SDatabaseEntry, com.sleepycat.client.SDatabaseEntry, com.sleepycat.client.SCompactConfig)
, the
lock timeout set for implicit transactions, in microseconds.timeout
- the lock timeout set for implicit transactions, in
microsecondsprotected T getThriftObj()
protected java.lang.Object getField(F field) throws java.lang.IllegalStateException
field
- the fieldjava.lang.IllegalStateException
- if the field is not setCopyright (c) 2016, 2019 Oracle and/or its affiliates. All rights reserved.