SMILA (incubation) API documentation

org.eclipse.smila.search.index
Class IndexManager

java.lang.Object
  extended by org.eclipse.smila.search.index.IndexManager

public abstract class IndexManager
extends java.lang.Object

The Class IndexManager.

Author:
August Georg Schmidt (BROX)

Method Summary
protected static void doGarbageCollection()
          Do garbage collection on index connections.
static IndexConnection getInstance(java.lang.String indexName)
          Returns the instance of a requested IndexConnection by the IndexName.
static boolean isIndexBusy(java.lang.String indexName)
          Checks if is index busy.
static void releaseInstance(IndexConnection indexConnection)
          Release index connection.
static void releaseInstance(IndexConnection indexConnection, boolean destroy)
          Release index connection.
static void shutdown()
          Shutdown all connections.
static void startBurstmode(IndexConnection indexConnection)
          Start burst mode for index connection.
static void stopBurstmode(IndexConnection indexConnection)
          Stop burst mode for index connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static IndexConnection getInstance(java.lang.String indexName)
                                   throws IndexException
Returns the instance of a requested IndexConnection by the IndexName. This method implements a pooling mechanism for these Object ensuring that: - onyl one IndexConnection is used at a time - there no more than the max. # of IndexConections per Index alive.

Parameters:
indexName - Index name.
Returns:
Index connection.
Throws:
IndexException - Unable to get instance of index connection.

releaseInstance

public static void releaseInstance(IndexConnection indexConnection)
Release index connection. This method does not destroy a index connection. releaseInstance(IndexConnection, boolean

Parameters:
indexConnection - Index connection to release.

releaseInstance

public static void releaseInstance(IndexConnection indexConnection,
                                   boolean destroy)
Release index connection.

Parameters:
indexConnection - Index connection to release.
destroy - Whether to destroy the index connection.

doGarbageCollection

protected static void doGarbageCollection()
Do garbage collection on index connections.


startBurstmode

public static void startBurstmode(IndexConnection indexConnection)
                           throws IndexException
Start burst mode for index connection.

Parameters:
indexConnection - Current index connection.
Throws:
IndexException - Unable to start burst mode.

stopBurstmode

public static void stopBurstmode(IndexConnection indexConnection)
                          throws IndexException
Stop burst mode for index connection.

Parameters:
indexConnection - Current index connection.
Throws:
IndexException - Unable to stop burst mode.

shutdown

public static void shutdown()
                     throws IndexException
Shutdown all connections.

Throws:
IndexException - Unable to shutdown all connections.

isIndexBusy

public static boolean isIndexBusy(java.lang.String indexName)
                           throws IndexException
Checks if is index busy.

Parameters:
indexName - the index name
Returns:
true, if is index busy
Throws:
IndexException - the index exception

SMILA (incubation) API documentation