public class Configuration extends Object
Configuration parameters used to determine locations of files, sizes of buffer pool and journal allocation, policies and other parameters required during Persistit initialization.
An application can construct and set up a Configuration
using
setXXX
methods directly. Alternatively, the configuration can be
specified in a set of properties that are read and interpreted by the
Configuration
. This object is used directly or indirectly by the
following methods:
Persistit.setConfiguration(Configuration)
- assigns a supplied
Configuration
directly.Persistit.setProperties(Properties)
- creates and loads a
Configuration
from the supplied Properties
.Persistit.setPropertiesFromFile(String)
- loads a properties file
from the specified file name, and then constructs a
Configuration
from the loaded Properties
.
Persistit.initialize()
- loads a properties file from a default
name and then constructs a Configuration
from the loaded
Properties
.
When parsing Properties
values this class implements a simple
substitution mechanism so that, for example, a common directory path may be
referenced by multiple properties as shown here:
In this example the property named
datapath = /var/lib/persistit
journalpath = ${datapath}/akiban_journal
volume.1=${datapath}/hwdemo,create,pageSize:16K,\
initialSize:10M,extensionSize:10M,maximumSize:1G
datapath
has no special
meaning other than as a substitution parameter.
Modifier and Type | Class and Description |
---|---|
static class |
Configuration.BufferPoolConfiguration
Configuration constraints that determine the number of
Buffer s in a BufferPool . |
Modifier and Type | Field and Description |
---|---|
static String |
APPEND_ONLY_PROPERTY_NAME
Property name for the "append only" property.
|
static String |
BUFFER_INVENTORY_PROPERTY_NAME
Property name to specify whether buffer inventory is enabled.
|
static String |
BUFFER_MEM_PROPERTY_NAME
Property name prefix for specifying buffer memory allocation.
|
static String |
BUFFER_PRELOAD_PROPERTY_NAME
Property name to specify whether buffer preloading is enabled.
|
static String |
BUFFERS_PROPERTY_NAME
Property name prefix for specifying buffer size and count.
|
static String |
CHECKPOINT_INTERVAL_PROPERTY_NAME
Property name for checkpoint interval in seconds
|
static String |
COMMIT_POLICY_PROPERTY_NAME
Property name for specifying the default
Transaction.CommitPolicy
("soft", "hard" or "group") |
static String |
CONFIG_FILE_PROPERTY_NAME
Property name by which name of properties file can be supplied.
|
static String |
CONSTRUCTOR_OVERRIDE_PROPERTY_NAME
Property name to specify whether DefaultValueCoder should use a declared
no-arg contructor within each class being deserialized.
|
static String |
DEFAULT_CONFIG_FILE
Default properties file name
|
static String |
DEFAULT_JOURNAL_PATH
Default path name for the journal.
|
static String |
DEFAULT_PROPERTIES_FILE_SUFFIX
Default suffix for properties file name
|
static String |
DEFAULT_SYSTEM_VOLUME_NAME
Default System Volume Name
|
static String |
ENABLE_JMX_PROPERTY_NAME
Property name for enabling Persistit Open MBean for JMX
|
static long |
GIGA
1,024 * 1048576L
|
static String |
IGNORE_MISSING_VOLUMES_PROPERTY
Property name for the "ignore missing volumes" property.
|
static String |
JOIN_POLICY_PROPERTY_NAME
Property name to specify the default
JoinPolicy . |
static String |
JOURNAL_BLOCKSIZE_PROPERTY_NAME
Property name for specifying the size of each journal file, e.g.,
"journalsize=400000000".
|
static String |
JOURNAL_PATH_PROPERTY_NAME
Property name for specifying the file specification for the journal.
|
static long |
KILO
1,024
|
static String |
LOGFILE_PROPERTY_NAME
Property name for log file name
|
static String |
LOGGING_PROPERTIES_NAME
Property name for log switches
|
static long |
MAXIMUM_TEMP_VOL_MAX_SIZE |
static long |
MEGA
1,024 * 1024L
|
static long |
MINIMUM_TEMP_VOL_MAX_SIZE |
static String |
READ_RETRY_PROPERTY_NAME
Property name for specifying whether Persistit should retry read
operations that fail due to IOExceptions.
|
static String |
RMI_REGISTRY_HOST_PROPERTY_NAME
Property name for the optional RMI registry host name
|
static String |
RMI_REGISTRY_PORT_PROPERTY_NAME
Property name for the optional RMI registry port
|
static String |
RMI_SERVER_PORT_PROPERTY_NAME
Name of port on which RMI server accepts connects.
|
static String |
SERIAL_OVERRIDE_PROPERTY_NAME
Property name to specify package and/or class names of classes that must
be serialized using standard Java serialization.
|
static String |
SHOW_GUI_PROPERTY_NAME
Property name for specifying whether Persistit should attempt to launch a
diagnostic utility for viewing internal state.
|
static String |
SPLIT_POLICY_PROPERTY_NAME
Property name to specify the default
SplitPolicy . |
static String |
SYSTEM_PROPERTY_PREFIX
Prefix used to form the a system property name.
|
static String |
SYSTEM_VOLUME_PROPERTY_NAME
Property name for specifying the system volume name
|
static String |
TEMPORARY_VOLUME_DIR_PROPERTY_NAME
Property name for specifying default temporary volume directory
|
static String |
TEMPORARY_VOLUME_MAX_SIZE_PROPERTY_NAME
Property name for specifying upper bound on temporary volume size
|
static String |
TEMPORARY_VOLUME_PAGE_SIZE_PROPERTY_NAME
Property name for specifying default temporary volume page size
|
static long |
TERA
1,024 * 1073741824L
|
static String |
TIMEOUT_PROPERTY
Property name for maximum length of time a Persistit operation will wait
for I/O completion before throwing a TimeoutException.
|
static String |
TIMESTAMP_PROPERTY
Property name for pseudo-property "timestamp";
|
static String |
USE_OLD_VSPEC
Property name to enable writing backward-compatible IV records
|
static String |
VERBOSE_PROPERTY
Property name for specifying whether Persistit should display diagnostic
messages.
|
static String |
VOLUME_PROPERTY_PREFIX
Property name prefix for specifying Volumes.
|
Constructor and Description |
---|
Configuration()
Construct a
Configuration instance. |
Configuration(Properties properties)
Construct a
Configuration instance and merge the supplied
Properties . |
Modifier and Type | Method and Description |
---|---|
boolean |
getBooleanProperty(String propName,
boolean dflt)
Parse and return a string value as either true or false.
|
String |
getBufferPoolConfiguration()
Return a summary of the buffer configuration of all buffer pool sizes as
a string.
|
Map<Integer,Configuration.BufferPoolConfiguration> |
getBufferPoolMap()
Return an an unmodifiable Map containing the
BufferPoolConfiguration instances for each possible buffer
size. |
long |
getCheckpointInterval()
Return the value defined by
setCheckpointInterval(long) |
Transaction.CommitPolicy |
getCommitPolicy()
Return the value defined by
setCommitPolicy(java.lang.String) |
JoinPolicy |
getJoinPolicy()
Return the value defined by
setJoinPolicy(java.lang.String) |
String |
getJournalPath()
Return the value defined by
setJournalPath(java.lang.String) |
long |
getJournalSize()
Return the value defined by
setJournalSize(long) |
String |
getLogFile()
Return the value defined by
setLogFile(java.lang.String) |
String |
getLogging()
Return the value defined by
setLogging(java.lang.String) |
Properties |
getProperties()
Return the
Properties from which this
Configuration was loaded. |
String |
getProperty(String propertyName)
Return a property value for the supplied
propertyName , or
null if there is no such property. |
String |
getProperty(String propertyName,
String defaultValue)
Returns a property value, or a default value if there is no such
property.
|
String |
getRmiHost()
Return the value defined by
setRmiHost(java.lang.String) |
int |
getRmiPort()
Return the value defined by
setRmiPort(int) . |
int |
getRmiServerPort()
Return the value defined by
setRmiServerPort(int) . |
String |
getSerialOverride()
Return the value defined by
setSerialOverride(java.lang.String) . |
SplitPolicy |
getSplitPolicy()
Return the value defined by
setSplitPolicy(java.lang.String) . |
String |
getSysVolume()
Return the value defined by
setSysVolume(java.lang.String) |
String |
getTmpVolDir()
Return the value defined by
setTmpVolDir(java.lang.String) |
long |
getTmpVolMaxSize()
Return the value defined by
setTmpVolMaxSize(long) ; |
int |
getTmpVolPageSize()
Return the value defined by
setTmpVolPageSize(int) |
List<VolumeSpecification> |
getVolumeList()
Return a List of
VolumeSpecification instances for
Volume s that Persistit should load or create during
initialization. |
boolean |
isAppendOnly()
Return the value defined by
setAppendOnly(boolean) |
boolean |
isBufferInventoryEnabled()
Return the value defined by
setBufferInventoryEnabled(boolean) |
boolean |
isBufferPreloadEnabled()
Return the value defined by
setBufferPreloadEnabled(boolean) |
boolean |
isConstructorOverride()
Return the value defined by
setConstructorOverride(boolean) . |
boolean |
isIgnoreMissingVolumes()
Return the value defined by
setIgnoreMissingVolumes(boolean) |
boolean |
isJmxEnabled()
Return the value defined by
setJmxEnabled(boolean) . |
boolean |
isShowGUI()
Return the value defined by
setShowGUI(boolean) |
boolean |
isUseOldVSpec()
Deprecated.
|
static boolean |
parseBooleanValue(String propName,
String str)
Parse a String as a boolean value.
|
static float |
parseFloatProperty(String propName,
String str)
Parse a string as a float value
|
static long |
parseLongProperty(String propName,
String str)
Parse a string as a long integer.
|
void |
setAppendOnly(boolean appendOnly)
Control whether Persistit starts in append-only mode.
|
void |
setBufferInventoryEnabled(boolean bufferInventoryEnabled)
Control whether Persistit periodically records an inventory of its buffer
pools to enable buffer pool preloading on a subsequent startup.
|
void |
setBufferPoolConfiguration(String string)
Parses and sets up the configuration of all buffer pools from the
supplied string.
|
void |
setBufferPreloadEnabled(boolean bufferPreloadEnabled)
Control whether Persistit attempts to preload (warm up) the buffer pools
by preloading pages recorded in a previously generated inventory.
|
void |
setCheckpointInterval(long checkpointInterval)
Set the checkpoint interval, in seconds.
|
void |
setCommitPolicy(String policyName)
Set the default
Transaction.CommitPolicy . |
void |
setCommitPolicy(Transaction.CommitPolicy commitPolicy)
Set the default
Transaction.CommitPolicy used by the
Transaction.commit() method. |
void |
setConstructorOverride(boolean constructorOverride)
Control Persistit should require and use every serialized object to have
a public no-argument constructor.
|
void |
setIgnoreMissingVolumes(boolean ignoreMissingVolumes)
Control whether Persistit starts in ignore-missing-volumes mode.
|
void |
setJmxEnabled(boolean jmx)
Control whether Persistit registers JMX MXBeans with the platform MBean
server during initialization.
|
void |
setJoinPolicy(JoinPolicy joinPolicy)
Set the default policy for balancing content between two pages when keys
are removed.
|
void |
setJoinPolicy(String policyName)
Set the default policy for balancing content between two pages when keys
are removed.
|
void |
setJournalPath(String journalPath)
Set the path name on which journal files will be created.
|
void |
setJournalSize(long journalSize)
Set the maximum size of each journal file.
|
void |
setLogFile(String logFile)
Set the file name to which
DefaultPersistitLogger writes log
entries. |
void |
setLogging(String logging)
Set the logging detail level for
DefaultPersistitLogger . |
void |
setProperty(String propertyName,
String value)
Set a property value in the configuration
Properties map. |
void |
setRmiHost(String rmiHost)
Set the URL of an Remote Method Invocation registry.
|
void |
setRmiPort(int rmiPort)
Set a port number on which Persistit will create a temporary Remote
Method Invocation registry.
|
void |
setRmiServerPort(int rmiServerPort)
Define a port to be used with an external RMI registry defined by
setRmiHost(java.lang.String) . |
void |
setSerialOverride(String serialOverride)
Set a pattern that identifies classes to be serialized using standard
Java serialization rather than Persistit's default serialization.
|
void |
setShowGUI(boolean showGUI)
Control whether Persistit starts up an attached instance of the AdminUI
tool during initialization.
|
void |
setSplitPolicy(SplitPolicy splitPolicy)
Set the default policy for balancing content between two pages when a
page is split.
|
void |
setSplitPolicy(String policyName)
Set the default policy for balancing content between two pages when a
page is split.
|
void |
setSysVolume(String sysVolume)
Set the system volume name attribute.
|
void |
setTmpVolDir(String tmpVolDir)
Set the name of a directory where backing files to hold temporary volumes
are created when needed.
|
void |
setTmpVolMaxSize(long tmpVolMaxSize)
Set the maximum temporary volume file size in bytes.
|
void |
setTmpVolPageSize(int tmpVolPageSize)
Set the default page size for newly created temporary volumes.
|
void |
setUseOldVSpec(boolean useOldVSpec)
Deprecated.
|
void |
setVolumeList(List<VolumeSpecification> list)
Copies the supplied
VolumeSpecification elements to the volume
list after first clearing it. |
String |
substituteProperties(String text,
Properties properties)
Replaces substitution variables in a supplied string with values taken
from the properties available to Persistit (see
getProperties()
). |
static int[] |
validBufferSizes()
Return an array containing all valid
Buffer sizes. |
VolumeSpecification |
volumeSpecification(String vstring)
Parse the supplied String as a
VolumeSpecification after
performing any available property value substitutions. |
public static final String SYSTEM_PROPERTY_PREFIX
journalpath=xyz
can also be specified as a system
property on the command line with the option
-Dcom.persistit.journalpath=xyz.public static final String DEFAULT_PROPERTIES_FILE_SUFFIX
public static final String DEFAULT_CONFIG_FILE
public static final String CONFIG_FILE_PROPERTY_NAME
public static final String BUFFERS_PROPERTY_NAME
public static final String BUFFER_MEM_PROPERTY_NAME
public static final String VOLUME_PROPERTY_PREFIX
public static final String JOURNAL_PATH_PROPERTY_NAME
public static final String JOURNAL_BLOCKSIZE_PROPERTY_NAME
public static final String DEFAULT_JOURNAL_PATH
public static final String DEFAULT_SYSTEM_VOLUME_NAME
public static final String SYSTEM_VOLUME_PROPERTY_NAME
public static final String CHECKPOINT_INTERVAL_PROPERTY_NAME
public static final String TEMPORARY_VOLUME_PAGE_SIZE_PROPERTY_NAME
public static final String TEMPORARY_VOLUME_DIR_PROPERTY_NAME
public static final String TEMPORARY_VOLUME_MAX_SIZE_PROPERTY_NAME
public static final long MINIMUM_TEMP_VOL_MAX_SIZE
public static final long MAXIMUM_TEMP_VOL_MAX_SIZE
public static final String COMMIT_POLICY_PROPERTY_NAME
Transaction.CommitPolicy
("soft", "hard" or "group")public static final String VERBOSE_PROPERTY
public static final String READ_RETRY_PROPERTY_NAME
public static final String TIMEOUT_PROPERTY
public static final String SERIAL_OVERRIDE_PROPERTY_NAME
public static final String CONSTRUCTOR_OVERRIDE_PROPERTY_NAME
true
, Serializable classes will be instantiated through
platform-specific API calls.public static final String SHOW_GUI_PROPERTY_NAME
public static final String LOGGING_PROPERTIES_NAME
public static final String LOGFILE_PROPERTY_NAME
public static final String RMI_REGISTRY_HOST_PROPERTY_NAME
public static final String RMI_REGISTRY_PORT_PROPERTY_NAME
public static final String RMI_SERVER_PORT_PROPERTY_NAME
public static final String ENABLE_JMX_PROPERTY_NAME
public static final String TIMESTAMP_PROPERTY
public static final String APPEND_ONLY_PROPERTY_NAME
public static final String IGNORE_MISSING_VOLUMES_PROPERTY
public static final String USE_OLD_VSPEC
public static final String SPLIT_POLICY_PROPERTY_NAME
SplitPolicy
.public static final String BUFFER_PRELOAD_PROPERTY_NAME
public static final String BUFFER_INVENTORY_PROPERTY_NAME
public static final String JOIN_POLICY_PROPERTY_NAME
JoinPolicy
.public static final long KILO
public static final long MEGA
public static final long GIGA
public static final long TERA
public Configuration()
Configuration
instance. This object may be
passed to the Persistit.initialize(Configuration)
method.public Configuration(Properties properties) throws InvalidVolumeSpecificationException
Configuration
instance and merge the supplied
Properties
. This object may be passed to the
Persistit.initialize(Configuration)
method.properties
- Properties from which configuration elements are parsed and
assigned. Property names unknown to Persistit are ignored.IllegalArgumentException
- of a property contains an invalid valueInvalidVolumeSpecificationException
public String substituteProperties(String text, Properties properties)
getProperties()
).text
- String in in which to make substitutionsproperties
- Properties containing substitution valuespublic Properties getProperties()
Properties
from which this
Configuration
was loaded. In a newly constructed instance,
this Properties
instance is empty.Properties
from which this
Configuration
was loadedpublic String getProperty(String propertyName)
Return a property value for the supplied propertyName
, or
null
if there is no such property. The property is taken
from one of the following sources:
journalpath
can be supplied as the system
property named com.persistit.journalpath
. (Note: if the
security context does not permit access to system properties then system
properties are ignored.)Properties
object which was either passed to the
Configuration(Properties)
or supplied by the
Persistit.initialize(Properties)
method.timestamp
. The value is the
current time formated by SimpleDateFormat
using the pattern
yyyyMMddHHmm. (This pseudo-property makes it easy to specify a unique log
file name each time Persistit is initialized.${pppp}
, then this method attempts perform a
substitution. To do so it recursively gets the value of a property named
pppp
, replaces the substring delimited by
${
and }
, and then scans the resulting string
for further substitution variables.propertyName
- The property namepublic String getProperty(String propertyName, String defaultValue)
Returns a property value, or a default value if there is no such property. The property is taken from one of the following sources:
Persistit.initialize(Properties)
method, or was loaded from the
file named in the Persistit.initialize(String)
method.timestamp
. The value is the
current time formated by SimpleDateFormat
using the pattern
yyyyMMddHHmm. (This pseudo-property makes it easy to specify a unique log
file name each time Persistit is initialized.${pppp}
, then this method attempts perform a
substitution. To do so it recursively gets the value of a property named
pppp
, replaces the substring delimited by
${
and }
, and then scans the resulting string
for further substitution variables.
For all properties, the value "-" (a single hyphen) explicitly specifies the default value.
propertyName
- The property namedefaultValue
- The default valuepublic void setProperty(String propertyName, String value)
Properties
map. If
the specified value is null then an existing property of the specified
name is removed.propertyName
- The property namevalue
- Value to set, or null
to remove an existing
propertypublic static long parseLongProperty(String propName, String str)
str
value of "100K" yields a parsed result of
102400.propName
- Name of the property, used in formating the Exception if the
value is invalid.str
- The string representation, e.g., "100K".IllegalArgumentException
- if the supplied String is not a valid integer representation.public static float parseFloatProperty(String propName, String str)
propName
- Name of the property, used in formating the Exception if the
value is invalid.str
- The string representation, e.g., "100K".IllegalArgumentException
- if the supplied String is not a valid floating point
representation, or is outside the supplied bounds.public static boolean parseBooleanValue(String propName, String str)
str
must be either true
or false
. The comparison is
case-insensitive.propName
- str
- public static int[] validBufferSizes()
Buffer
sizes.Buffer
sizespublic boolean getBooleanProperty(String propName, boolean dflt)
propName
- Name of the property, used in formating the Exception if the
value is invalid.dflt
- The default valuepublic VolumeSpecification volumeSpecification(String vstring) throws InvalidVolumeSpecificationException
VolumeSpecification
after
performing any available property value substitutions.vstring
- a specification string as defined in
VolumeSpecification(String)
.VolumeSpecification
InvalidVolumeSpecificationException
getProperty(String)
public Map<Integer,Configuration.BufferPoolConfiguration> getBufferPoolMap()
BufferPoolConfiguration
instances for each possible buffer
size.public String getBufferPoolConfiguration()
4096,count=1000;16384,minMemory=0,maxMemory=512G,reserved=1G,fraction=0.6
public void setBufferPoolConfiguration(String string)
string
- public List<VolumeSpecification> getVolumeList()
VolumeSpecification
instances for
Volume
s that Persistit should load or create during
initialization. An application can add VolumeSpecification
elements to this list before calling
Persistit.initialize(Configuration)
.VolumeSpecification
spublic void setVolumeList(List<VolumeSpecification> list)
VolumeSpecification
elements to the volume
list after first clearing it. This method allows a list of
VolumeSpecifications to be injected as a property.list
- List of VolumeSpecifications for volumes to be opened when the
Persistit.initialize()
method is calledpublic String getJournalPath()
setJournalPath(java.lang.String)
public void setJournalPath(String journalPath)
Set the path name on which journal files will be created. Each journal
file name will be created by adding a period followed by a twelve-digit
number to this value. A typical value would be
Where the
${datapath}/journal
datapath
property specifies a directory containing
Persistit data files.
journalPath
- the path to setpublic long getJournalSize()
setJournalSize(long)
public void setJournalSize(long journalSize)
Set the maximum size of each journal file. When adding a record to a journal file would result in a file larger than this size, Persistit instead create a new journal file with a larger numeric suffix. The default size of 1,000,000,000 has been tested extensively on current server-class configurations and is recommended.
Default size is 1000000000LjournalSize
- the journalSize to setpublic long getCheckpointInterval()
setCheckpointInterval(long)
public void setCheckpointInterval(long checkpointInterval)
Set the checkpoint interval, in seconds. This setting controls the elapsed time between attempts to write a checkpoint to the journal. A longer interval allows more updates to accumulate in buffers before they are required to be written to disk, but also potentially causes recovery from an abrupt termination (crash) to take more time.
Default size is 120Lpublic String getSysVolume()
setSysVolume(java.lang.String)
public void setSysVolume(String sysVolume)
Set the system volume name attribute. The system volume is used by
DefaultCoderManager
and others to store metadata about objects
encoded in Persistit. The value should specify a valid volume name or
alias. If a configuration contains only one volume then by default it is
also selected as the system volume.
Default value is determined by volume specifications Property name is "sysvolume"
sysVolume
- the sysVolume to setpublic String getTmpVolDir()
setTmpVolDir(java.lang.String)
public void setTmpVolDir(String tmpVolDir)
Set the name of a directory where backing files to hold temporary volumes are created when needed. By default such files are created as system-defined temporary files.
Default value isnull
meaning the system-assigned temporary
file path is usedtmpVolDir
- the temporary volume directory to setpublic int getTmpVolPageSize()
setTmpVolPageSize(int)
public void setTmpVolPageSize(int tmpVolPageSize)
Set the default page size for newly created temporary volumes. In the
normal case where Persistit has only one BufferPool
it is
unnecessary to set this value because Persistit implicitly selects the
buffer size for that pool. However, in a configuration with multiple
buffer pools, this attribute selects which one to use.
Default value is determined by buffer pool configuration
Property name is "tmpvolpagesize"
tmpVolPageSize
- the default temporary volume page size to setpublic long getTmpVolMaxSize()
setTmpVolMaxSize(long)
;public void setTmpVolMaxSize(long tmpVolMaxSize)
Set the maximum temporary volume file size in bytes. This method specifies a constraint on file growth to avoid runaway disk utilization.
Default value is @link Long.MAX_VALUE
Property name is "tmpvolmaxsize"
tmpVolMaxSize
- the maximum size in bytes to which a temporary volume file may
grow to setpublic Transaction.CommitPolicy getCommitPolicy()
setCommitPolicy(java.lang.String)
public void setCommitPolicy(String policyName)
Set the default Transaction.CommitPolicy
. The
string value must be one of "HARD", "GROUP" or "SOFT" (case insensitive).
Default value is SOFT
Property name is "txnpolicy"
policyName
- Name of the commitPolicy the commitPolicy to setTransaction.commit()
public void setCommitPolicy(Transaction.CommitPolicy commitPolicy)
Set the default Transaction.CommitPolicy
used by the
Transaction.commit()
method.
Default value is SOFT
commitPolicy
- the commitPolicy to setpublic JoinPolicy getJoinPolicy()
setJoinPolicy(java.lang.String)
public void setJoinPolicy(String policyName)
Set the default policy for balancing content between two pages when keys
are removed. The Exchange.setJoinPolicy(JoinPolicy)
may be used
to override this behavior in a particular Exchange
.
Default value is EVEN
Property name is "joinpolicy"
policyName
- Name of the JoinPolicy
to set, one of "LEFT",
"RIGHT" or "EVEN" (case insensitive)public void setJoinPolicy(JoinPolicy joinPolicy)
Set the default policy for balancing content between two pages when keys
are removed. The Exchange.setJoinPolicy(JoinPolicy)
may be used
to override this behavior in a particular Exchange
.
Default value is EVEN
joinPolicy
- the JoinPolicy
to setpublic SplitPolicy getSplitPolicy()
setSplitPolicy(java.lang.String)
.public void setSplitPolicy(String policyName)
Set the default policy for balancing content between two pages when a
page is split. The Exchange.setSplitPolicy(SplitPolicy)
may be
used to override this behavior in a particular Exchange
.
Default value is PACK
Property name is "splitpolicy"
policyName
- Name of the SplitPolicy
to set.SplitPolicy
public void setSplitPolicy(SplitPolicy splitPolicy)
Set the default policy for balancing content between two pages when a
page is split. The Exchange.setSplitPolicy(SplitPolicy)
may be
used to override this behavior in a particular Exchange
.
Default value is PACK
splitPolicy
- the SplitPolicy
to set.SplitPolicy
public String getSerialOverride()
setSerialOverride(java.lang.String)
.public void setSerialOverride(String serialOverride)
Set a pattern that identifies classes to be serialized using standard Java serialization rather than Persistit's default serialization.
Default value is null
Property name is "serialOverride"
serialOverride
- the serial override pattern to setDefaultCoderManager
,
Serializationpublic boolean isConstructorOverride()
setConstructorOverride(boolean)
.public void setConstructorOverride(boolean constructorOverride)
Control Persistit should require and use every serialized object to have
a public no-argument constructor. If so, then that constructor is used
when deserializing in the DefaultObjectCoder
; if not then
Persistit uses private methods within the JDK to emulate standard Java
serialization logic.
Default value is false
Property name is "constructorOverride"
constructorOverride
- the constructorOverride to setpublic boolean isShowGUI()
setShowGUI(boolean)
public void setShowGUI(boolean showGUI)
Control whether Persistit starts up an attached instance of the AdminUI tool during initialization.
Default value is false
Property name is "showgui"
showGUI
- true
to start the AdminUIpublic String getLogging()
setLogging(java.lang.String)
public void setLogging(String logging)
Set the logging detail level for DefaultPersistitLogger
. This
parameter has effect only if DefaultPersistitLogger
is in
use; it has no effect on any of the logging adapters.
Default value is INFO
Property name is "logging"
logging
- log detail level, one of "NONE", "TRACE", "DEBUG", "INFO",
"WARNING", "ERROR".Persistit.setPersistitLogger(com.persistit.logging.PersistitLogger)
public String getLogFile()
setLogFile(java.lang.String)
public void setLogFile(String logFile)
Set the file name to which DefaultPersistitLogger
writes log
entries. This parameter has effect only if
DefaultPersistitLogger
is in use; it has no effect on any of
the logging adapters.
Default value is null
- no log file is created
Property value is "logfile"
logFile
- the logFile to setpublic String getRmiHost()
setRmiHost(java.lang.String)
public void setRmiHost(String rmiHost)
Set the URL of an Remote Method Invocation registry. If non-null,
Persistit registers its a server for its Management
interface at
the specified external registry.
Default value is null
Property value is
"rmihost"
rmiHost
- the rmiHost to setpublic int getRmiPort()
setRmiPort(int)
.public void setRmiPort(int rmiPort)
Set a port number on which Persistit will create a temporary Remote
Method Invocation registry. If non-zero Persistit creates a registry and
registers a Management
server on it. This allows remote access to
management facilities within Persistit and permits the AdminUI utility to
attach to and manage a Persistit instance running on a headless server.
Specifying a non-zero value of this attribute is incompatible with
setting a non-null value in setRmiHost(String)
.
Default value is 0
Property name is "rmiport"
rmiPort
- the rmiPort to setpublic int getRmiServerPort()
setRmiServerPort(int)
.public void setRmiServerPort(int rmiServerPort)
Define a port to be used with an external RMI registry defined by
setRmiHost(java.lang.String)
. If zero, the registry uses an anonymous port.
Default value is 0
Property name is "rmiserverport"
rmiServerPort
- the rmiServerPort to setpublic boolean isJmxEnabled()
setJmxEnabled(boolean)
.public void setJmxEnabled(boolean jmx)
Control whether Persistit registers JMX MXBeans with the platform MBean server during initialization. Enables access to performance and other data by JConsole, VisualVM and JMX clients.
Default value is false
Property name is ENABLE_JMX_PROPERTY_NAME
jmx
- the jmx to setpublic boolean isAppendOnly()
setAppendOnly(boolean)
public void setAppendOnly(boolean appendOnly)
Control whether Persistit starts in append-only mode. In this mode
Persistit accumulates database updates in the journal without copying
changes back into the volume files. This method changes only the initial
state; use Management.setAppendOnly(boolean)
method to change
this behavior dynamically while the system is running.
Default value is false
Property name is "appendonly"
appendOnly
- true
to start Persistit in append-only modepublic boolean isBufferInventoryEnabled()
setBufferInventoryEnabled(boolean)
true
if periodic buffer pool inventory recording is
enabledpublic void setBufferInventoryEnabled(boolean bufferInventoryEnabled)
Control whether Persistit periodically records an inventory of its buffer pools to enable buffer pool preloading on a subsequent startup.
Default value is false
Property name is "bufferinventory"
bufferInventoryEnabled
- true
to enable periodic buffer inventory behaviorpublic boolean isBufferPreloadEnabled()
setBufferPreloadEnabled(boolean)
true
if the option to preload buffer pools is
enabledpublic void setBufferPreloadEnabled(boolean bufferPreloadEnabled)
Control whether Persistit attempts to preload (warm up) the buffer pools by preloading pages recorded in a previously generated inventory.
Default value is false
Property name is "bufferinventory"
bufferPreloadEnabled
- true
to enable buffer pool preloading during
startuppublic boolean isIgnoreMissingVolumes()
setIgnoreMissingVolumes(boolean)
true
indicates that ignore-missing-volumes
mode is enabledpublic void setIgnoreMissingVolumes(boolean ignoreMissingVolumes)
Control whether Persistit starts in ignore-missing-volumes mode.
In this mode references in the journal to unknown volumes are ignored
rather than noted as CorruptJournalException
s. Almost always this
mode should be disabled; the setting is available to enable recovery of a
journal into a subset of formerly existing volumes and should be used
only with care.
Default value is false
Property name is "ignoremissingvolumes"
ignoreMissingVolumes
- true
to ignore missing volumes@Deprecated public boolean isUseOldVSpec()
setUseOldVSpec(boolean)
true
indicates that use-old-vspec mode is
enabled@Deprecated public void setUseOldVSpec(boolean useOldVSpec)
Control whether Persistit writes old-format volume identifiers into the
Journal. By default as of version 3.1.8, Persistit writes a complete
VolumeSpecification
into the journal IV (Identify Volume) record
rather than just a volume name. This is preferable in almost all cases.
However, journals written in this new format cannot be read by earlier
versions of Persistit. To retain the ability to drop back to an earlier
version of Persistit, enabling use-old-vspec mode causes Persistit
to write only the volume name rather than the entire VolumeSpecification.
Journal files created by version 3.1.8 with this mode enabled can be used
by earlier versions of Persistit. However, doing so prevents volumes
created dynamically using
Persistit.loadVolume(com.persistit.VolumeSpecification)
from
being recovered properly. (See
https://bugs.launchpad.net/akiban-persistit/+bug/1045971)
This method and configuration parameter is deprecated and will be removed after existing sites have been upgraded and are likely not to revert to any version of Persistit earlier than 3.1.8
useOldVSpec
- true
to write only the volume name into the
journal.Copyright © 2025 Open Identity Platform Community. All rights reserved.