SMILA 1.0 API documentation

org.eclipse.smila.importing.state.objectstore
Class ObjectStoreStateService

java.lang.Object
  extended by org.eclipse.smila.importing.state.objectstore.ObjectStoreStateService

public class ObjectStoreStateService
extends java.lang.Object

ObjectStore based implementation of a state service used in the jobmanager based importing framework.

Author:
scum36

Field Summary
protected static java.lang.String KEY
          key for the entry.
protected static java.lang.String KEY_DESCRIPTOR
          key for the descriptor entry in the data object.
protected static java.lang.String KEY_JOBRUNID
          key for the job run ID entry in the data object.
protected static java.lang.String KEY_OBJECTID
          key for the objectId entry in the data object.
protected static java.lang.String KEY_SOURCEID
          key for the sourceId entry in the data object.
protected static java.lang.String ROOT_ENTRIES
          root directory in ObjectStore for delta entries.
 
Constructor Summary
ObjectStoreStateService(java.lang.String storeName, StateStoreConfiguration configuration, ObjectStoreService objectStore)
           
 
Method Summary
 void clearAll()
           
 void clearSource(java.lang.String sourceId)
           
 long countEntries(java.lang.String sourceId, boolean countExact)
          count the entries of the given source.
 AnyMap getEntry(java.lang.String sourceId, java.lang.String objectId)
           
 java.util.Collection<java.lang.String> getSourceIds()
           
 void mark(java.lang.String sourceId, java.lang.String objectId, java.lang.String jobRunId, java.lang.String descriptor)
           
protected  void writeEntry(AnyMap value)
          update the entry in the objectstore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY

protected static final java.lang.String KEY
key for the entry.

See Also:
Constant Field Values

KEY_OBJECTID

protected static final java.lang.String KEY_OBJECTID
key for the objectId entry in the data object.

See Also:
Constant Field Values

KEY_SOURCEID

protected static final java.lang.String KEY_SOURCEID
key for the sourceId entry in the data object.

See Also:
Constant Field Values

KEY_DESCRIPTOR

protected static final java.lang.String KEY_DESCRIPTOR
key for the descriptor entry in the data object.

See Also:
Constant Field Values

KEY_JOBRUNID

protected static final java.lang.String KEY_JOBRUNID
key for the job run ID entry in the data object.

See Also:
Constant Field Values

ROOT_ENTRIES

protected static final java.lang.String ROOT_ENTRIES
root directory in ObjectStore for delta entries.

See Also:
Constant Field Values
Constructor Detail

ObjectStoreStateService

public ObjectStoreStateService(java.lang.String storeName,
                               StateStoreConfiguration configuration,
                               ObjectStoreService objectStore)
Method Detail

getEntry

public AnyMap getEntry(java.lang.String sourceId,
                       java.lang.String objectId)
                throws StateException
Throws:
StateException

mark

public void mark(java.lang.String sourceId,
                 java.lang.String objectId,
                 java.lang.String jobRunId,
                 java.lang.String descriptor)
          throws StateException
Throws:
StateException

clearSource

public void clearSource(java.lang.String sourceId)
                 throws StateException
Throws:
StateException

clearAll

public void clearAll()
              throws StateException
Throws:
StateException

getSourceIds

public java.util.Collection<java.lang.String> getSourceIds()
                                                    throws StateException
Returns:
all source ids. Throws StateNotFoundException if store doesn't exist yet.
Throws:
StateException

countEntries

public long countEntries(java.lang.String sourceId,
                         boolean countExact)
                  throws StateException
count the entries of the given source. Throws StateNotFoundException if store or source do not exist yet.

Throws:
StateException

writeEntry

protected void writeEntry(AnyMap value)
                   throws StateException
update the entry in the objectstore.

Throws:
StateException

SMILA 1.0 API documentation