public class ObjectStoreStateService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
KEY
key for the entry.
|
protected static java.lang.String |
KEY_COMPOUNDID
key for the compoundId entry in the data object.
|
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 and Description |
---|
ObjectStoreStateService(java.lang.String storeName,
StateStoreConfiguration configuration,
ObjectStoreService objectStore)
creates a new instance of the service.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAll()
clears all stores.
|
void |
clearSource(java.lang.String sourceId)
clears a source.
|
long |
countEntries(java.lang.String sourceId,
boolean countExact)
count the entries of the given source.
|
void |
deleteEntry(java.lang.String sourceId,
DeltaService.EntryId entryId)
remove an entry.
|
AnyMap |
getEntry(java.lang.String sourceId,
java.lang.String objectId,
java.lang.String compoundId)
retrieves the information for an entry.
|
java.util.Collection<java.lang.String> |
getShardPrefixes(java.lang.String sourceId)
get object-id prefixes of all shards to use as input for
getUnvisitedObjectIds(String, String) . |
java.util.Collection<java.lang.String> |
getSourceIds() |
java.util.Collection<DeltaService.EntryId> |
getUnvisitedObjectIds(java.lang.String sourceAndShardPrefix,
java.lang.String jobRunId)
get all object IDs from a shard that have not been visited in the given job run.
|
void |
mark(java.lang.String sourceId,
java.lang.String objectId,
java.lang.String compoundId,
java.lang.String jobRunId,
java.lang.String descriptor)
marks an entry.
|
void |
markCompoundElementsVisited(java.lang.String sourceId,
java.lang.String compoundRecordId,
java.lang.String jobRunId)
update the job run id of all entries that belong to the given compound.
|
protected void |
writeEntry(AnyMap value)
update the entry in the objectstore.
|
protected static final java.lang.String KEY
protected static final java.lang.String KEY_OBJECTID
protected static final java.lang.String KEY_COMPOUNDID
protected static final java.lang.String KEY_SOURCEID
protected static final java.lang.String KEY_DESCRIPTOR
protected static final java.lang.String KEY_JOBRUNID
protected static final java.lang.String ROOT_ENTRIES
public ObjectStoreStateService(java.lang.String storeName, StateStoreConfiguration configuration, ObjectStoreService objectStore)
public AnyMap getEntry(java.lang.String sourceId, java.lang.String objectId, java.lang.String compoundId) throws StateException
StateException
public void mark(java.lang.String sourceId, java.lang.String objectId, java.lang.String compoundId, java.lang.String jobRunId, java.lang.String descriptor) throws StateException
StateException
public void clearSource(java.lang.String sourceId) throws StateException
StateException
public void clearAll() throws StateException
StateException
public java.util.Collection<java.lang.String> getSourceIds() throws StateException
StateException
public long countEntries(java.lang.String sourceId, boolean countExact) throws StateException
StateException
public java.util.Collection<java.lang.String> getShardPrefixes(java.lang.String sourceId) throws StateException
getUnvisitedObjectIds(String, String)
.StateException
public java.util.Collection<DeltaService.EntryId> getUnvisitedObjectIds(java.lang.String sourceAndShardPrefix, java.lang.String jobRunId) throws StateException
StateException
public void markCompoundElementsVisited(java.lang.String sourceId, java.lang.String compoundRecordId, java.lang.String jobRunId) throws StateException
StateException
public void deleteEntry(java.lang.String sourceId, DeltaService.EntryId entryId) throws StateException
StateException
protected void writeEntry(AnyMap value) throws StateException
StateException