public class CompactConfig
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static CompactConfig |
DEFAULT
Default configuration used if null is passed to methods that create a
cursor.
|
Constructor and Description |
---|
CompactConfig()
Construct a default configuration object for compact operations.
|
Modifier and Type | Method and Description |
---|---|
int |
getFillPercent()
Return the the desired fill percentage.
|
boolean |
getFreeListOnly()
Return true if the whether to skip page compaction.
|
boolean |
getFreeSpace()
Return true if the whether to return pages to the filesystem.
|
int |
getMaxPages()
Return the the maximum number of pages to free.
|
int |
getTimeout()
Return the the lock timeout set for implicit transactions, in microseconds.
|
void |
setFillPercent(int fillpercent)
Set the desired fill percentage.
|
void |
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.
|
void |
setFreeSpace(boolean freeSpace)
Return pages to the filesystem if possible.
|
void |
setMaxPages(int maxPages)
Set the maximum number of pages to free.
|
void |
setTimeout(int timeout)
Set the lock timeout for implicit transactions.
|
public static final CompactConfig DEFAULT
public CompactConfig()
public void setFillPercent(int fillpercent)
fillpercent
- The desired fill percentage.public int getFillPercent()
This method may be called at any time during the life of the application.
public void setFreeListOnly(boolean freeListOnly)
freeListOnly
- Whether to skip page compactionpublic boolean getFreeListOnly()
This method may be called at any time during the life of the application.
public void setFreeSpace(boolean freeSpace)
freeSpace
- Whether to return pages to the filesystempublic boolean getFreeSpace()
This method may be called at any time during the life of the application.
public void setMaxPages(int maxPages)
maxPages
- If non-zero, the call will return after that number of pages have been
freed.public int getMaxPages()
This method may be called at any time during the life of the application.
public void setTimeout(int timeout)
Database.compact(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.CompactConfig)
, the lock timeout set for implicit
transactions, in microseconds.timeout
- the lock timeout set for implicit transactions, in microseconds.public int getTimeout()
This method may be called at any time during the life of the application.
Copyright (c) 1996, 2017 Oracle and/or its affiliates. All rights reserved.