com.sleepycat.db
Class Environment
java.lang.Object
com.sleepycat.db.Environment
public class Environment
- extends java.lang.Object
Method Summary |
Transaction |
beginCDSGroup()
|
Transaction |
beginTransaction(Transaction parent,
TransactionConfig config)
|
void |
checkpoint(CheckpointConfig config)
|
void |
close()
|
int |
createLockerID()
|
int |
detectDeadlocks(LockDetectMode mode)
|
void |
electReplicationMaster(int nsites,
int nvotes)
|
void |
flushReplication()
|
void |
freeLockerID(int id)
|
java.io.File[] |
getArchiveDatabases()
|
java.io.File[] |
getArchiveLogFiles(boolean includeInUse)
|
CacheFileStats[] |
getCacheFileStats(StatsConfig config)
|
CacheStats |
getCacheStats(StatsConfig config)
|
EnvironmentConfig |
getConfig()
|
java.io.File |
getHome()
|
Lock |
getLock(int locker,
boolean noWait,
DatabaseEntry object,
LockRequestMode mode)
|
LockStats |
getLockStats(StatsConfig config)
|
java.lang.String |
getLogFileName(LogSequenceNumber lsn)
|
LogStats |
getLogStats(StatsConfig config)
|
MutexStats |
getMutexStats(StatsConfig config)
|
boolean |
getReplicationConfig(ReplicationConfig config)
|
ReplicationManagerStats |
getReplicationManagerStats(StatsConfig config)
|
ReplicationStats |
getReplicationStats(StatsConfig config)
|
int |
getReplicationTimeout(ReplicationTimeoutType type)
|
TransactionStats |
getTransactionStats(StatsConfig config)
|
static int |
getVersionMajor()
|
static int |
getVersionMinor()
|
static int |
getVersionPatch()
|
static java.lang.String |
getVersionString()
|
void |
lockVector(int locker,
boolean noWait,
LockRequest[] list)
|
void |
logFlush(LogSequenceNumber lsn)
|
void |
logPrint(Transaction txn,
java.lang.String message)
|
LogSequenceNumber |
logPut(DatabaseEntry data,
boolean flush)
|
Database |
openDatabase(Transaction txn,
java.lang.String fileName,
java.lang.String databaseName,
DatabaseConfig config)
|
LogCursor |
openLogCursor()
|
SecondaryDatabase |
openSecondaryDatabase(Transaction txn,
java.lang.String fileName,
java.lang.String databaseName,
Database primaryDatabase,
SecondaryConfig config)
|
void |
panic(boolean onoff)
|
ReplicationStatus |
processReplicationMessage(DatabaseEntry control,
DatabaseEntry rec,
int envid)
|
void |
putLock(Lock lock)
|
PreparedTransaction[] |
recover(int count,
boolean continued)
|
static void |
remove(java.io.File home,
boolean force,
EnvironmentConfig config)
|
void |
removeDatabase(Transaction txn,
java.lang.String fileName,
java.lang.String databaseName)
|
void |
removeOldLogFiles()
|
void |
renameDatabase(Transaction txn,
java.lang.String fileName,
java.lang.String databaseName,
java.lang.String newName)
|
void |
replicationManagerStart(int nthreads,
ReplicationManagerStartPolicy disp)
|
void |
resetFileID(java.lang.String filename,
boolean encrypted)
|
void |
resetLogSequenceNumber(java.lang.String filename,
boolean encrypted)
|
void |
setConfig(EnvironmentConfig config)
|
void |
setReplicationConfig(ReplicationConfig config,
boolean onoff)
|
void |
setReplicationTimeout(ReplicationTimeoutType type,
int replicationTimeout)
|
void |
startReplication(DatabaseEntry cdata,
boolean master)
|
void |
syncReplication()
|
int |
trickleCacheWrite(int percent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Environment
public Environment(java.io.File home,
EnvironmentConfig config)
throws DatabaseException,
java.io.FileNotFoundException
- Throws:
DatabaseException
java.io.FileNotFoundException
close
public void close()
throws DatabaseException
- Throws:
DatabaseException
remove
public static void remove(java.io.File home,
boolean force,
EnvironmentConfig config)
throws DatabaseException,
java.io.FileNotFoundException
- Throws:
DatabaseException
java.io.FileNotFoundException
setConfig
public void setConfig(EnvironmentConfig config)
throws DatabaseException
- Throws:
DatabaseException
getConfig
public EnvironmentConfig getConfig()
throws DatabaseException
- Throws:
DatabaseException
openDatabase
public Database openDatabase(Transaction txn,
java.lang.String fileName,
java.lang.String databaseName,
DatabaseConfig config)
throws DatabaseException,
java.io.FileNotFoundException
- Throws:
DatabaseException
java.io.FileNotFoundException
openSecondaryDatabase
public SecondaryDatabase openSecondaryDatabase(Transaction txn,
java.lang.String fileName,
java.lang.String databaseName,
Database primaryDatabase,
SecondaryConfig config)
throws DatabaseException,
java.io.FileNotFoundException
- Throws:
DatabaseException
java.io.FileNotFoundException
removeDatabase
public void removeDatabase(Transaction txn,
java.lang.String fileName,
java.lang.String databaseName)
throws DatabaseException,
java.io.FileNotFoundException
- Throws:
DatabaseException
java.io.FileNotFoundException
renameDatabase
public void renameDatabase(Transaction txn,
java.lang.String fileName,
java.lang.String databaseName,
java.lang.String newName)
throws DatabaseException,
java.io.FileNotFoundException
- Throws:
DatabaseException
java.io.FileNotFoundException
getHome
public java.io.File getHome()
throws DatabaseException
- Throws:
DatabaseException
trickleCacheWrite
public int trickleCacheWrite(int percent)
throws DatabaseException
- Throws:
DatabaseException
detectDeadlocks
public int detectDeadlocks(LockDetectMode mode)
throws DatabaseException
- Throws:
DatabaseException
getLock
public Lock getLock(int locker,
boolean noWait,
DatabaseEntry object,
LockRequestMode mode)
throws DatabaseException
- Throws:
DatabaseException
putLock
public void putLock(Lock lock)
throws DatabaseException
- Throws:
DatabaseException
createLockerID
public int createLockerID()
throws DatabaseException
- Throws:
DatabaseException
freeLockerID
public void freeLockerID(int id)
throws DatabaseException
- Throws:
DatabaseException
lockVector
public void lockVector(int locker,
boolean noWait,
LockRequest[] list)
throws DatabaseException
- Throws:
DatabaseException
openLogCursor
public LogCursor openLogCursor()
throws DatabaseException
- Throws:
DatabaseException
getLogFileName
public java.lang.String getLogFileName(LogSequenceNumber lsn)
throws DatabaseException
- Throws:
DatabaseException
startReplication
public void startReplication(DatabaseEntry cdata,
boolean master)
throws DatabaseException
- Throws:
DatabaseException
electReplicationMaster
public void electReplicationMaster(int nsites,
int nvotes)
throws DatabaseException
- Throws:
DatabaseException
flushReplication
public void flushReplication()
throws DatabaseException
- Throws:
DatabaseException
processReplicationMessage
public ReplicationStatus processReplicationMessage(DatabaseEntry control,
DatabaseEntry rec,
int envid)
throws DatabaseException
- Throws:
DatabaseException
setReplicationConfig
public void setReplicationConfig(ReplicationConfig config,
boolean onoff)
throws DatabaseException
- Throws:
DatabaseException
getReplicationConfig
public boolean getReplicationConfig(ReplicationConfig config)
throws DatabaseException
- Throws:
DatabaseException
setReplicationTimeout
public void setReplicationTimeout(ReplicationTimeoutType type,
int replicationTimeout)
throws DatabaseException
- Throws:
DatabaseException
getReplicationTimeout
public int getReplicationTimeout(ReplicationTimeoutType type)
throws DatabaseException
- Throws:
DatabaseException
syncReplication
public void syncReplication()
throws DatabaseException
- Throws:
DatabaseException
replicationManagerStart
public void replicationManagerStart(int nthreads,
ReplicationManagerStartPolicy disp)
throws DatabaseException
- Throws:
DatabaseException
getCacheStats
public CacheStats getCacheStats(StatsConfig config)
throws DatabaseException
- Throws:
DatabaseException
getCacheFileStats
public CacheFileStats[] getCacheFileStats(StatsConfig config)
throws DatabaseException
- Throws:
DatabaseException
getLogStats
public LogStats getLogStats(StatsConfig config)
throws DatabaseException
- Throws:
DatabaseException
getReplicationStats
public ReplicationStats getReplicationStats(StatsConfig config)
throws DatabaseException
- Throws:
DatabaseException
getReplicationManagerStats
public ReplicationManagerStats getReplicationManagerStats(StatsConfig config)
throws DatabaseException
- Throws:
DatabaseException
getLockStats
public LockStats getLockStats(StatsConfig config)
throws DatabaseException
- Throws:
DatabaseException
getMutexStats
public MutexStats getMutexStats(StatsConfig config)
throws DatabaseException
- Throws:
DatabaseException
getTransactionStats
public TransactionStats getTransactionStats(StatsConfig config)
throws DatabaseException
- Throws:
DatabaseException
beginCDSGroup
public Transaction beginCDSGroup()
throws DatabaseException
- Throws:
DatabaseException
beginTransaction
public Transaction beginTransaction(Transaction parent,
TransactionConfig config)
throws DatabaseException
- Throws:
DatabaseException
checkpoint
public void checkpoint(CheckpointConfig config)
throws DatabaseException
- Throws:
DatabaseException
logFlush
public void logFlush(LogSequenceNumber lsn)
throws DatabaseException
- Throws:
DatabaseException
logPut
public LogSequenceNumber logPut(DatabaseEntry data,
boolean flush)
throws DatabaseException
- Throws:
DatabaseException
logPrint
public void logPrint(Transaction txn,
java.lang.String message)
throws DatabaseException
- Throws:
DatabaseException
getArchiveLogFiles
public java.io.File[] getArchiveLogFiles(boolean includeInUse)
throws DatabaseException
- Throws:
DatabaseException
getArchiveDatabases
public java.io.File[] getArchiveDatabases()
throws DatabaseException
- Throws:
DatabaseException
removeOldLogFiles
public void removeOldLogFiles()
throws DatabaseException
- Throws:
DatabaseException
recover
public PreparedTransaction[] recover(int count,
boolean continued)
throws DatabaseException
- Throws:
DatabaseException
resetFileID
public void resetFileID(java.lang.String filename,
boolean encrypted)
throws DatabaseException
- Throws:
DatabaseException
resetLogSequenceNumber
public void resetLogSequenceNumber(java.lang.String filename,
boolean encrypted)
throws DatabaseException
- Throws:
DatabaseException
panic
public void panic(boolean onoff)
throws DatabaseException
- Throws:
DatabaseException
getVersionString
public static java.lang.String getVersionString()
getVersionMajor
public static int getVersionMajor()
getVersionMinor
public static int getVersionMinor()
getVersionPatch
public static int getVersionPatch()