org.opends.server.backends.jeb
Class IndexRebuildThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.opends.server.api.DirectoryThread
          extended by org.opends.server.backends.jeb.IndexRebuildThread
All Implemented Interfaces:
java.lang.Runnable

public class IndexRebuildThread
extends DirectoryThread

A thread to do the actual work of rebuilding an index.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void clearDatabase()
          Clear the database and prep it for the rebuild.
 long getDuplicatedEntries()
          Get the number of entries that encountered duplicated indexType values in the rebuild process.
 org.opends.server.backends.jeb.IndexRebuildThread.IndexType getIndexType()
          Get the index type being rebuilt by this thread.
 long getProcessedEntries()
          Get the number of entries processed in the rebuild.
 long getRebuiltEntries()
          Get the number of entries successfully rebuilt.
 long getSkippedEntries()
          Get the number of entries skipped because they were either not applicable or an error occurred during the process.
 long getTotalEntries()
          Get the total entries to process in the rebuild.
 void run()
          Start the rebuild process.
 
Methods inherited from class org.opends.server.api.DirectoryThread
getAssociatedTask, getCreationStackTrace, getDebugProperties, getParentThread, setAssociatedTask
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

clearDatabase

public void clearDatabase()
                   throws com.sleepycat.je.DatabaseException
Clear the database and prep it for the rebuild.

Throws:
com.sleepycat.je.DatabaseException - if a JE databse error occurs while clearing the database being rebuilt.

run

public void run()
Start the rebuild process.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getTotalEntries

public long getTotalEntries()
                     throws com.sleepycat.je.DatabaseException
Get the total entries to process in the rebuild.

Returns:
The total entries to process.
Throws:
com.sleepycat.je.DatabaseException - if an error occurs while getting the total number of entries to process.

getProcessedEntries

public long getProcessedEntries()
Get the number of entries processed in the rebuild.

Returns:
The total entries processed.

getRebuiltEntries

public long getRebuiltEntries()
Get the number of entries successfully rebuilt.

Returns:
The number of entries successfully rebuilt.

getDuplicatedEntries

public long getDuplicatedEntries()
Get the number of entries that encountered duplicated indexType values in the rebuild process.

Returns:
The number of entries that encountered duplicated indexType values in the rebuild process.

getSkippedEntries

public long getSkippedEntries()
Get the number of entries skipped because they were either not applicable or an error occurred during the process.

Returns:
The number of entries skipped.

getIndexType

public org.opends.server.backends.jeb.IndexRebuildThread.IndexType getIndexType()
Get the index type being rebuilt by this thread.

Returns:
The index type being rebuilt by this thread.