org.opends.server.backends.jeb
Class State

java.lang.Object
  extended by org.opends.server.backends.jeb.DatabaseContainer
      extended by org.opends.server.backends.jeb.State

public class State
extends DatabaseContainer

This class is responsible for storing the configuration state of the JE backend for a particular suffix.


Field Summary
 
Fields inherited from class org.opends.server.backends.jeb.DatabaseContainer
dbConfig, entryContainer, name
 
Method Summary
 boolean getIndexTrustState(com.sleepycat.je.Transaction txn, Index index)
          Fetch index state from the database.
 boolean getIndexTrustState(com.sleepycat.je.Transaction txn, VLVIndex vlvIndex)
          Fetch index state from the database.
 boolean putIndexTrustState(com.sleepycat.je.Transaction txn, Index index, boolean trusted)
          Put index state to database.
 boolean putIndexTrustState(com.sleepycat.je.Transaction txn, VLVIndex vlvIndex, boolean trusted)
          Put VLV index state to database.
 boolean removeIndexTrustState(com.sleepycat.je.Transaction txn, Index index)
          Remove a record from the entry database.
 
Methods inherited from class org.opends.server.backends.jeb.DatabaseContainer
delete, getName, getRecordCount, insert, open, openCursor, preload, put, read, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

removeIndexTrustState

public boolean removeIndexTrustState(com.sleepycat.je.Transaction txn,
                                     Index index)
                              throws com.sleepycat.je.DatabaseException
Remove a record from the entry database.

Parameters:
txn - The database transaction or null if none.
index - The index storing the trusted state info.
Returns:
true if the entry was removed, false if it was not.
Throws:
com.sleepycat.je.DatabaseException - If an error occurs in the JE database.

getIndexTrustState

public boolean getIndexTrustState(com.sleepycat.je.Transaction txn,
                                  Index index)
                           throws com.sleepycat.je.DatabaseException
Fetch index state from the database.

Parameters:
txn - The database transaction or null if none.
index - The index storing the trusted state info.
Returns:
The trusted state of the index in the database.
Throws:
com.sleepycat.je.DatabaseException - If an error occurs in the JE database.

getIndexTrustState

public boolean getIndexTrustState(com.sleepycat.je.Transaction txn,
                                  VLVIndex vlvIndex)
                           throws com.sleepycat.je.DatabaseException
Fetch index state from the database.

Parameters:
txn - The database transaction or null if none.
vlvIndex - The index storing the trusted state info.
Returns:
The trusted state of the index in the database.
Throws:
com.sleepycat.je.DatabaseException - If an error occurs in the JE database.

putIndexTrustState

public boolean putIndexTrustState(com.sleepycat.je.Transaction txn,
                                  Index index,
                                  boolean trusted)
                           throws com.sleepycat.je.DatabaseException
Put index state to database.

Parameters:
txn - The database transaction or null if none.
index - The index storing the trusted state info.
trusted - The state value to put into the database.
Returns:
true if the entry was written, false if it was not.
Throws:
com.sleepycat.je.DatabaseException - If an error occurs in the JE database.

putIndexTrustState

public boolean putIndexTrustState(com.sleepycat.je.Transaction txn,
                                  VLVIndex vlvIndex,
                                  boolean trusted)
                           throws com.sleepycat.je.DatabaseException
Put VLV index state to database.

Parameters:
txn - The database transaction or null if none.
vlvIndex - The VLV index storing the trusted state info.
trusted - The state value to put into the database.
Returns:
true if the entry was written, false if it was not.
Throws:
com.sleepycat.je.DatabaseException - If an error occurs in the JE database.