com.sleepycat.je
Class Environment

java.lang.Object
  extended by com.sleepycat.je.Environment
Direct Known Subclasses:
XAEnvironment

public class Environment
extends Object

Javadoc for this public class is generated via the doc templates in the doc_src directory.


Field Summary
protected  EnvironmentImpl environmentImpl
           
 
Constructor Summary
Environment(File envHome)
          Get an Environment for an existing EnvironmentImpl.
Environment(File envHome, EnvironmentConfig configuration)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 
Method Summary
(package private)  void addReferringHandle(Database db)
           
(package private)  void addReferringHandle(Transaction txn)
          Let the Environment remember what's opened against it.
 Transaction beginTransaction(Transaction parent, TransactionConfig txnConfig)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
protected  void checkEnv()
          Throws if the environmentImpl is invalid.
protected  void checkHandleIsValid()
           
 void checkpoint(CheckpointConfig ckptConfig)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 int cleanLog()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void close()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void compress()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void evictMemory()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 EnvironmentConfig getConfig()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 List getDatabaseNames()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
(package private)  TransactionConfig getDefaultTxnConfig()
          Returns the default txn config for this environment handle.
(package private)  EnvironmentImpl getEnvironmentImpl()
          Internal entrypoint.
 File getHome()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 LockStats getLockStats(StatsConfig config)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
(package private)  long getMemoryUsage()
          Returns the current memory usage in bytes for all btrees in the environmentImpl.
 EnvironmentMutableConfig getMutableConfig()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 EnvironmentStats getStats(StatsConfig config)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 Transaction getThreadTransaction()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 TransactionStats getTransactionStats(StatsConfig config)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 Database openDatabase(Transaction txn, String databaseName, DatabaseConfig dbConfig)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 SecondaryDatabase openSecondaryDatabase(Transaction txn, String databaseName, Database primaryDatabase, SecondaryConfig dbConfig)
          Javadoc for this public class is generated via the doc templates in the doc_src directory.
 void removeDatabase(Transaction txn, String databaseName)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
(package private)  void removeReferringHandle(Database db)
          The referring db has been closed.
(package private)  void removeReferringHandle(Transaction txn)
          The referring Transaction has been closed.
 void renameDatabase(Transaction txn, String databaseName, String newName)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void setMutableConfig(EnvironmentMutableConfig mutableConfig)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void setThreadTransaction(Transaction txn)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void sync()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 long truncateDatabase(Transaction txn, String databaseName, boolean returnCount)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
(package private)  void upgrade()
          Not public yet, since there's nothing to upgrade.
 boolean verify(VerifyConfig config, PrintStream out)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

environmentImpl

protected EnvironmentImpl environmentImpl
Constructor Detail

Environment

public Environment(File envHome,
                   EnvironmentConfig configuration)
            throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

Environment

Environment(File envHome)
      throws DatabaseException
Get an Environment for an existing EnvironmentImpl. Used by utilities such as the JMX MBean which don't want to open the environment or be reference counted. The calling application must take care not to retain the the doc templates in the doc_src directory.

Throws:
DatabaseException
Method Detail

close

public void close()
           throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

openDatabase

public Database openDatabase(Transaction txn,
                             String databaseName,
                             DatabaseConfig dbConfig)
                      throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

openSecondaryDatabase

public SecondaryDatabase openSecondaryDatabase(Transaction txn,
                                               String databaseName,
                                               Database primaryDatabase,
                                               SecondaryConfig dbConfig)
                                        throws DatabaseException
Javadoc for this public class is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

removeDatabase

public void removeDatabase(Transaction txn,
                           String databaseName)
                    throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

renameDatabase

public void renameDatabase(Transaction txn,
                           String databaseName,
                           String newName)
                    throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

truncateDatabase

public long truncateDatabase(Transaction txn,
                             String databaseName,
                             boolean returnCount)
                      throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

getMemoryUsage

long getMemoryUsage()
              throws DatabaseException
Returns the current memory usage in bytes for all btrees in the environmentImpl.

Throws:
DatabaseException

getHome

public File getHome()
             throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

getDefaultTxnConfig

TransactionConfig getDefaultTxnConfig()
Returns the default txn config for this environment handle.


beginTransaction

public Transaction beginTransaction(Transaction parent,
                                    TransactionConfig txnConfig)
                             throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

checkpoint

public void checkpoint(CheckpointConfig ckptConfig)
                throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

sync

public void sync()
          throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

cleanLog

public int cleanLog()
             throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

evictMemory

public void evictMemory()
                 throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

compress

public void compress()
              throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

getConfig

public EnvironmentConfig getConfig()
                            throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

setMutableConfig

public void setMutableConfig(EnvironmentMutableConfig mutableConfig)
                      throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

getMutableConfig

public EnvironmentMutableConfig getMutableConfig()
                                          throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

upgrade

void upgrade()
       throws DatabaseException
Not public yet, since there's nothing to upgrade.

Throws:
DatabaseException

getStats

public EnvironmentStats getStats(StatsConfig config)
                          throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

getLockStats

public LockStats getLockStats(StatsConfig config)
                       throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

getTransactionStats

public TransactionStats getTransactionStats(StatsConfig config)
                                     throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

getDatabaseNames

public List getDatabaseNames()
                      throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

verify

public boolean verify(VerifyConfig config,
                      PrintStream out)
               throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

getThreadTransaction

public Transaction getThreadTransaction()
                                 throws DatabaseException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
DatabaseException

setThreadTransaction

public void setThreadTransaction(Transaction txn)
Javadoc for this public method is generated via the doc templates in the doc_src directory.


addReferringHandle

void addReferringHandle(Database db)

addReferringHandle

void addReferringHandle(Transaction txn)
Let the Environment remember what's opened against it.


removeReferringHandle

void removeReferringHandle(Database db)
The referring db has been closed.


removeReferringHandle

void removeReferringHandle(Transaction txn)
The referring Transaction has been closed.


getEnvironmentImpl

EnvironmentImpl getEnvironmentImpl()
Internal entrypoint.


checkHandleIsValid

protected void checkHandleIsValid()
                           throws DatabaseException
Throws:
DatabaseException

checkEnv

protected void checkEnv()
                 throws DatabaseException,
                        RunRecoveryException
Throws if the environmentImpl is invalid.

Throws:
DatabaseException
RunRecoveryException


Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.