public class RootContainer extends Object implements ConfigurationChangeListener<LocalDBBackendCfg>
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationChange(LocalDBBackendCfg cfg)
Applies the configuration changes to this change listener.
|
void |
close()
Closes this root container.
|
Set<DN> |
getBaseDNs()
Returns all the baseDNs this root container stores.
|
JECompressedSchema |
getCompressedSchema()
Retrieves the compressed schema manager for this backend.
|
LocalDBBackendCfg |
getConfiguration()
Get the backend configuration used by this root container.
|
EntryContainer |
getEntryContainer(DN baseDN)
Return the entry container for a specific base DN.
|
Collection<EntryContainer> |
getEntryContainers()
Return all the entry containers in this root container.
|
long |
getEntryCount()
Get the total number of entries in this root container.
|
com.sleepycat.je.EnvironmentConfig |
getEnvironmentConfig()
Get the environment config of the JE environment used in this root
container.
|
com.sleepycat.je.EnvironmentStats |
getEnvironmentStats(com.sleepycat.je.StatsConfig statsConfig)
Get the environment stats of the JE environment used in this root
container.
|
com.sleepycat.je.TransactionStats |
getEnvironmentTransactionStats(com.sleepycat.je.StatsConfig statsConfig)
Get the environment transaction stats of the JE environment used
in this root container.
|
Long |
getLowestEntryID()
Return the lowest entry ID assigned.
|
org.opends.server.backends.jeb.DatabaseEnvironmentMonitor |
getMonitorProvider()
Get the DatabaseEnvironmentMonitor object for JE environment used by this
root container.
|
EntryID |
getNextEntryID()
Assign the next entry ID.
|
boolean |
isConfigurationChangeAcceptable(LocalDBBackendCfg cfg,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is
acceptable to this change listener.
|
boolean |
isValid()
Returns whether this container JE database environment is
open, valid and can be used.
|
void |
open(com.sleepycat.je.EnvironmentConfig envConfig)
Opens the root container using the JE configuration object provided.
|
void |
preload(long timeLimit)
Preload the database cache.
|
void |
resetNextEntryID()
Resets the next entry ID counter to zero.
|
public void open(com.sleepycat.je.EnvironmentConfig envConfig) throws com.sleepycat.je.DatabaseException, InitializationException, ConfigException
envConfig
- The JE environment configuration.com.sleepycat.je.DatabaseException
- If a database error occurs when creating
the environment.InitializationException
- If an initialization error occurs while
creating the environment.ConfigException
- If an configuration error occurs while
creating the environment.public JECompressedSchema getCompressedSchema()
public org.opends.server.backends.jeb.DatabaseEnvironmentMonitor getMonitorProvider()
public void preload(long timeLimit)
timeLimit
- The time limit for the preload process.public void close() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs while attempting to close
the root container.public Collection<EntryContainer> getEntryContainers()
public Set<DN> getBaseDNs()
public EntryContainer getEntryContainer(DN baseDN)
baseDN
- The base DN of the entry container to retrieve.public com.sleepycat.je.EnvironmentStats getEnvironmentStats(com.sleepycat.je.StatsConfig statsConfig) throws com.sleepycat.je.DatabaseException
statsConfig
- The configuration to use for the EnvironmentStats
object.com.sleepycat.je.DatabaseException
- If an error occurs while retrieving the stats
object.public com.sleepycat.je.TransactionStats getEnvironmentTransactionStats(com.sleepycat.je.StatsConfig statsConfig) throws com.sleepycat.je.DatabaseException
statsConfig
- The configuration to use for the EnvironmentStats
object.com.sleepycat.je.DatabaseException
- If an error occurs while retrieving the stats
object.public com.sleepycat.je.EnvironmentConfig getEnvironmentConfig() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs while retrieving the
configuration object.public LocalDBBackendCfg getConfiguration()
public long getEntryCount() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
- If an error occurs while retrieving the entry
count.public EntryID getNextEntryID()
public Long getLowestEntryID()
public void resetNextEntryID()
public boolean isConfigurationChangeAcceptable(LocalDBBackendCfg cfg, List<LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<LocalDBBackendCfg>
cfg
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed change is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationChange(LocalDBBackendCfg cfg)
applyConfigurationChange
in interface ConfigurationChangeListener<LocalDBBackendCfg>
cfg
- The new configuration containing the changes.public boolean isValid()
true
if valid, or false
otherwise.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.