|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.dbi.EnvironmentImpl
public class EnvironmentImpl
Underlying Environment implementation. There is a single instance for any database environment opened by the application.
Field Summary | |
---|---|
protected LogManager |
logManager
|
Constructor Summary | |
---|---|
EnvironmentImpl(File envHome,
EnvironmentConfig envConfig)
Create a database environment to represent the data in envHome. |
Method Summary | |
---|---|
void |
addConfigObserver(EnvConfigObserver o)
Adds an observer of mutable config changes. |
void |
addToCompressorQueue(BIN bin,
Key deletedKey,
boolean doWakeup)
Tells the asynchronous IN compressor thread about a BIN with a deleted entry. |
void |
addToCompressorQueue(BINReference binRef,
boolean doWakeup)
Tells the asynchronous IN compressor thread about a BINReference with a deleted entry. |
void |
addToCompressorQueue(Collection binRefs,
boolean doWakeup)
Tells the asynchronous IN compressor thread about a collections of BINReferences with deleted entries. |
(package private) void |
alertEvictor()
|
void |
checkIfInvalid()
|
void |
checkImmutablePropsForEquality(EnvironmentConfig config)
Throws an exception if an immutable property is changed. |
void |
checkNotClosed()
|
EnvironmentConfig |
cloneConfig()
Clones the current configuration. |
EnvironmentMutableConfig |
cloneMutableConfig()
Clones the current mutable configuration. |
void |
close()
|
void |
close(boolean doCheckpoint)
|
void |
closeAfterRunRecovery()
|
void |
closeLogger()
Close down the logger. |
DatabaseImpl |
createDb(Locker locker,
String databaseName,
DatabaseConfig dbConfig,
Database databaseHandle)
|
void |
dbRemove(Locker locker,
String databaseName)
Remove a database. |
void |
dbRename(Locker locker,
String databaseName,
String newName)
Rename a database. |
static void |
decThreadLocalReferenceCount()
|
void |
dumpMapTree()
For debugging. |
void |
enableDebugLoggingToDbLog()
Add the database log as one of the debug logging destinations when the logging system is sufficiently initialized. |
void |
envConfigUpdate(DbConfigManager mgr)
Respond to config updates. |
void |
forceClose()
|
long |
forceLogFileFlip()
Flip the log to a new file, forcing an fsync. |
Checkpointer |
getCheckpointer()
|
Cleaner |
getCleaner()
|
DbConfigManager |
getConfigManager()
Returns the config manager for the current base configuration. |
DatabaseImpl |
getDb(Locker locker,
String databaseName,
Database databaseHandle)
Get a database object given a database name. |
DbTree |
getDbMapTree()
|
List |
getDbNames()
|
File |
getEnvironmentHome()
Get the environment home directory. |
Evictor |
getEvictor()
|
FileManager |
getFileManager()
|
INCompressor |
getINCompressor()
Return the incompressor. |
int |
getINCompressorQueueSize()
|
INList |
getInMemoryINs()
|
RecoveryInfo |
getLastRecoveryInfo()
Info about the last recovery |
long |
getLockTimeout()
|
Logger |
getLogger()
|
LogManager |
getLogManager()
|
MemoryBudget |
getMemoryBudget()
|
static boolean |
getNoComparators()
|
long |
getRootLsn()
|
static int |
getThreadLocalReferenceCount()
|
SharedLatch |
getTriggerLatch()
Returns the shared trigger latch. |
TxnManager |
getTxnManager()
|
long |
getTxnTimeout()
|
UtilizationProfile |
getUtilizationProfile()
Returns the UtilizationProfile. |
UtilizationTracker |
getUtilizationTracker()
Returns the UtilizationTracker. |
void |
incReferenceCount()
|
static void |
incThreadLocalReferenceCount()
|
void |
invalidate(RunRecoveryException e)
Invalidate the environment. |
boolean |
invokeCheckpoint(CheckpointConfig config,
boolean flushAll,
String invokingSource)
Invoke a checkpoint programatically. |
int |
invokeCleaner()
|
boolean |
invokeCompressor()
Invoke a compress programatically. |
void |
invokeEvictor()
|
boolean |
isClosed()
|
boolean |
isOpen()
|
boolean |
isReadOnly()
|
boolean |
isTransactional()
|
void |
lazyCompress(IN in)
Do lazy compression at opportune moments. |
EnvironmentStats |
loadStats(StatsConfig config)
Retrieve and return stat information. |
LockStats |
lockStat(StatsConfig config)
Retrieve lock statistics |
void |
logMapTreeRoot()
Log the map tree root and save the LSN. |
static boolean |
maybeForceYield()
For stress testing. |
boolean |
mayNotWrite()
When a RunRecoveryException occurs or the environment is closed, further writing can cause log corruption. |
void |
open()
Not much to do, mark state. |
void |
readMapTreeFromLog(long rootLsn)
Set the mapping tree from the log. |
void |
removeConfigObserver(EnvConfigObserver o)
Removes an observer of mutable config changes. |
void |
rewriteMapTreeRoot(long cleanerTargetLsn)
Force a rewrite of the map tree root if required. |
void |
setMutableConfig(EnvironmentMutableConfig config)
Changes the mutable config properties that are present in the given config, and notifies all config observer. |
(package private) void |
shutdownCheckpointer()
|
void |
shutdownCleaner()
public for unit tests. |
void |
shutdownEvictor()
|
void |
shutdownINCompressor()
Available for the unit tests. |
TruncateResult |
truncate(Locker locker,
DatabaseImpl database)
Deprecated. This supports Database.truncate(), which is deprecated. |
long |
truncate(Locker locker,
String databaseName)
Truncate a database. |
Txn |
txnBegin(Transaction parent,
TransactionConfig txnConfig)
Transactional services. |
TransactionStats |
txnStat(StatsConfig config)
Retrieve txn statistics |
boolean |
useDirectNIO()
|
boolean |
verify(VerifyConfig config,
PrintStream out)
|
void |
verifyCursors()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LogManager logManager
Constructor Detail |
---|
public EnvironmentImpl(File envHome, EnvironmentConfig envConfig) throws DatabaseException
envHome
- absolute path of the database environment
home directoryenvConfig
-
DatabaseException
- on all other failuresMethod Detail |
---|
public void envConfigUpdate(DbConfigManager mgr) throws DatabaseException
envConfigUpdate
in interface EnvConfigObserver
DatabaseException
public INCompressor getINCompressor()
public UtilizationTracker getUtilizationTracker()
public UtilizationProfile getUtilizationProfile()
public void logMapTreeRoot() throws DatabaseException
DatabaseException
public void rewriteMapTreeRoot(long cleanerTargetLsn) throws DatabaseException
DatabaseException
public long getRootLsn()
public void readMapTreeFromLog(long rootLsn) throws DatabaseException
DatabaseException
public void addToCompressorQueue(BIN bin, Key deletedKey, boolean doWakeup) throws DatabaseException
DatabaseException
public void addToCompressorQueue(BINReference binRef, boolean doWakeup) throws DatabaseException
DatabaseException
public void addToCompressorQueue(Collection binRefs, boolean doWakeup) throws DatabaseException
DatabaseException
public void lazyCompress(IN in) throws DatabaseException
DatabaseException
public void enableDebugLoggingToDbLog() throws DatabaseException
DatabaseException
public void closeLogger()
public void open()
public void invalidate(RunRecoveryException e)
public boolean isOpen()
public boolean isClosed()
public boolean mayNotWrite()
public void checkIfInvalid() throws RunRecoveryException
RunRecoveryException
public void checkNotClosed() throws DatabaseException
DatabaseException
public void close() throws DatabaseException
DatabaseException
public void close(boolean doCheckpoint) throws DatabaseException
DatabaseException
public void closeAfterRunRecovery() throws DatabaseException
DatabaseException
public void forceClose() throws DatabaseException
DatabaseException
public void incReferenceCount()
public static int getThreadLocalReferenceCount()
public static void incThreadLocalReferenceCount()
public static void decThreadLocalReferenceCount()
public static boolean getNoComparators()
public boolean invokeCheckpoint(CheckpointConfig config, boolean flushAll, String invokingSource) throws DatabaseException
DatabaseException
public long forceLogFileFlip() throws DatabaseException
DatabaseException
public boolean invokeCompressor() throws DatabaseException
DatabaseException
public void invokeEvictor() throws DatabaseException
DatabaseException
public int invokeCleaner() throws DatabaseException
DatabaseException
public void shutdownINCompressor() throws InterruptedException
InterruptedException
public void shutdownEvictor() throws InterruptedException
InterruptedException
void shutdownCheckpointer() throws InterruptedException
InterruptedException
public void shutdownCleaner() throws InterruptedException
InterruptedException
public boolean isTransactional()
public boolean isReadOnly()
public boolean useDirectNIO()
public DatabaseImpl createDb(Locker locker, String databaseName, DatabaseConfig dbConfig, Database databaseHandle) throws DatabaseException
DatabaseException
public DatabaseImpl getDb(Locker locker, String databaseName, Database databaseHandle) throws DatabaseException
databaseName
- target database.
DatabaseException
public List getDbNames() throws DatabaseException
DatabaseException
public void dumpMapTree() throws DatabaseException
DatabaseException
public void dbRename(Locker locker, String databaseName, String newName) throws DatabaseException
DatabaseException
public void dbRemove(Locker locker, String databaseName) throws DatabaseException
DatabaseException
public TruncateResult truncate(Locker locker, DatabaseImpl database) throws DatabaseException
DatabaseException
public long truncate(Locker locker, String databaseName) throws DatabaseException
DatabaseException
public Txn txnBegin(Transaction parent, TransactionConfig txnConfig) throws DatabaseException
DatabaseException
public LogManager getLogManager()
public FileManager getFileManager()
public DbTree getDbMapTree()
public DbConfigManager getConfigManager()
The configuration can change, but changes are made by replacing the config manager object with a enw one. To use a consistent set of properties, call this method once and query the returned manager repeatedly for each property, rather than getting the config manager via this method for each property individually.
public EnvironmentConfig cloneConfig()
public EnvironmentMutableConfig cloneMutableConfig()
public void checkImmutablePropsForEquality(EnvironmentConfig config) throws IllegalArgumentException
IllegalArgumentException
public void setMutableConfig(EnvironmentMutableConfig config) throws DatabaseException
DatabaseException
public void addConfigObserver(EnvConfigObserver o)
public void removeConfigObserver(EnvConfigObserver o)
public INList getInMemoryINs()
public TxnManager getTxnManager()
public Checkpointer getCheckpointer()
public Cleaner getCleaner()
public MemoryBudget getMemoryBudget()
public Logger getLogger()
public boolean verify(VerifyConfig config, PrintStream out) throws DatabaseException
DatabaseException
public void verifyCursors() throws DatabaseException
DatabaseException
public EnvironmentStats loadStats(StatsConfig config) throws DatabaseException
DatabaseException
public LockStats lockStat(StatsConfig config) throws DatabaseException
DatabaseException
public TransactionStats txnStat(StatsConfig config) throws DatabaseException
DatabaseException
public int getINCompressorQueueSize() throws DatabaseException
DatabaseException
public RecoveryInfo getLastRecoveryInfo()
public File getEnvironmentHome()
public long getTxnTimeout()
public long getLockTimeout()
public SharedLatch getTriggerLatch()
public Evictor getEvictor()
void alertEvictor()
public static boolean maybeForceYield()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |