SMILA (incubation) API documentation

org.eclipse.smila.connectivity.deltaindexing
Class AbstractDeltaIndexingManagerAgent

java.lang.Object
  extended by org.eclipse.smila.management.LocatedManagementAgentBase
      extended by org.eclipse.smila.management.DeclarativeManagementAgent
          extended by org.eclipse.smila.management.DeclarativeServiceManagementAgent<DeltaIndexingManager>
              extended by org.eclipse.smila.connectivity.deltaindexing.AbstractDeltaIndexingManagerAgent
All Implemented Interfaces:
DeltaIndexingManagerAgent, LocatedManagementAgent, ManagementAgent
Direct Known Subclasses:
DeltaIndexingManagerAgentImpl, DeltaIndexingManagerAgentImpl

public abstract class AbstractDeltaIndexingManagerAgent
extends DeclarativeServiceManagementAgent<DeltaIndexingManager>
implements DeltaIndexingManagerAgent

An abstract base class for DeltaIndexingManagerAgent implementations.


Field Summary
 
Fields inherited from class org.eclipse.smila.management.DeclarativeServiceManagementAgent
_service
 
Fields inherited from class org.eclipse.smila.management.DeclarativeManagementAgent
_log
 
Constructor Summary
AbstractDeltaIndexingManagerAgent()
           
 
Method Summary
protected  void checkDataSource(java.lang.String dataSourceID)
          check if DeltaIndexingManager knows about the given data source.
 java.lang.String clear(java.lang.String dataSourceID)
          Clear all entries of the DeltaIndexingManager for the given dataSourceID.
 java.lang.String clearAll()
          Clears all entries of the DeltaIndexingManager including entries of any active sessions! Note that this may cause errors in clients currently using any of the closed sessions.
protected  java.lang.String getCategory()
          Gets the category.
 java.lang.Object getEntryCount(java.lang.String dataSourceID)
          Get the number of delta indexing entries for the given dataSourceID.
 java.util.Map<java.lang.String,java.lang.Long> getEntryCounts()
          Get the number of delta indexing entries for all data sources.
protected  java.lang.String getErrorMessage(java.lang.Throwable ex)
           
 java.util.Map<java.lang.String,java.lang.String> getLockStates()
          Get an overview what data sources are locked or unlocked.
protected  java.lang.String getName()
          Gets the name.
 java.lang.String unlock(java.lang.String dataSourceID)
          Unlock the given data source and removes the sessions.
 java.lang.String unlockAll()
          Unlock all data sources and removes all sessions.
 
Methods inherited from class org.eclipse.smila.management.DeclarativeServiceManagementAgent
setService, unsetService
 
Methods inherited from class org.eclipse.smila.management.DeclarativeManagementAgent
activate, deactivate
 
Methods inherited from class org.eclipse.smila.management.LocatedManagementAgentBase
getLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDeltaIndexingManagerAgent

public AbstractDeltaIndexingManagerAgent()
Method Detail

getCategory

protected java.lang.String getCategory()
Gets the category.

Specified by:
getCategory in class LocatedManagementAgentBase
Returns:
the category
See Also:
LocatedManagementAgentBase.getCategory()

getName

protected java.lang.String getName()
Gets the name.

Specified by:
getName in class LocatedManagementAgentBase
Returns:
the name
See Also:
LocatedManagementAgentBase.getName()

clear

public java.lang.String clear(java.lang.String dataSourceID)
Clear all entries of the DeltaIndexingManager for the given dataSourceID. You cannot execute this command on an already locked data source. If you want to clear a locked data source you have to unlock it first.

Specified by:
clear in interface DeltaIndexingManagerAgent
Parameters:
dataSourceID - the data source id
Returns:
a message saying either "OK" or describing an error cause.
See Also:
DeltaIndexingManagerAgent.clear(java.lang.String)

clearAll

public java.lang.String clearAll()
Clears all entries of the DeltaIndexingManager including entries of any active sessions! Note that this may cause errors in clients currently using any of the closed sessions.

Specified by:
clearAll in interface DeltaIndexingManagerAgent
Returns:
a message saying either "OK" or describing an error cause.
See Also:
DeltaIndexingManagerAgent.clearAll()

unlock

public java.lang.String unlock(java.lang.String dataSourceID)
Unlock the given data source and removes the sessions. Note that this may cause exceptions in a client currently using the closed sessions.

Specified by:
unlock in interface DeltaIndexingManagerAgent
Parameters:
dataSourceID - the data source id
Returns:
a message saying either "OK" or describing an error cause.
See Also:
DeltaIndexingManagerAgent.unlock(String)

unlockAll

public java.lang.String unlockAll()
Unlock all data sources and removes all sessions. Note that this may cause exceptions in clients currently using any of the closed sessions.

Specified by:
unlockAll in interface DeltaIndexingManagerAgent
Returns:
a message saying either "OK" or describing an error cause.
See Also:
DeltaIndexingManagerAgent.unlockAll()

getLockStates

public java.util.Map<java.lang.String,java.lang.String> getLockStates()
Get an overview what data sources are locked or unlocked.

Specified by:
getLockStates in interface DeltaIndexingManagerAgent
Returns:
a map containing the dataSoureId and the LockState
See Also:
DeltaIndexingManagerAgent.getLockStates()

getEntryCount

public java.lang.Object getEntryCount(java.lang.String dataSourceID)
Get the number of delta indexing entries for the given dataSourceID.

Specified by:
getEntryCount in interface DeltaIndexingManagerAgent
Parameters:
dataSourceID - the data source id
Returns:
either a Long giving the number of entries or a String with an error message.
See Also:
DeltaIndexingManagerAgent.getEntryCount(String)

getEntryCounts

public java.util.Map<java.lang.String,java.lang.Long> getEntryCounts()
Get the number of delta indexing entries for all data sources.

Specified by:
getEntryCounts in interface DeltaIndexingManagerAgent
Returns:
a map containing the dataSoureId and the entry count
See Also:
DeltaIndexingManagerAgent.getEntryCounts()

checkDataSource

protected void checkDataSource(java.lang.String dataSourceID)
                        throws DeltaIndexingException
check if DeltaIndexingManager knows about the given data source.

Parameters:
dataSourceID - the data source id
Throws:
DeltaIndexingException - if no such data source exists.

getErrorMessage

protected java.lang.String getErrorMessage(java.lang.Throwable ex)
Parameters:
ex - an exception
Returns:
error description to return to client.

SMILA (incubation) API documentation