|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.importing.state.objectstore.ObjectStoreDeltaService
public class ObjectStoreDeltaService
ObjectStore based implementation of the DeltaService for the jobmanager based importing framework.
| Field Summary | |
|---|---|
static java.lang.String |
BUNDLE_ID
bundle ID for configuration area access. |
static java.lang.String |
STORENAME
objectstore store name. |
| Constructor Summary | |
|---|---|
ObjectStoreDeltaService()
|
|
| Method Summary | |
|---|---|
protected void |
activate(ComponentContext context)
service activation. |
State |
checkState(java.lang.String sourceId,
java.lang.String recordId,
java.lang.String jobRunId,
java.lang.String hashCode)
Determine delta state of record identified by sourceId and recordId. |
void |
clearAll()
delete all state information in the service about all data sources. |
void |
clearSource(java.lang.String sourceId)
delete all state information in the service about the given data source. |
long |
countEntries(java.lang.String sourceId,
boolean countExact)
|
protected void |
deactivate(ComponentContext context)
service deactivation. |
java.util.Collection<java.lang.String> |
getSourceIds()
get Ids of all sources that currently have entries in the DeltaService. |
void |
markAsUpdated(java.lang.String sourceId,
java.lang.String recordId,
java.lang.String jobRunId,
java.lang.String hashCode)
Mark the record as visited in the current crawl job run. |
void |
setObjectStore(ObjectStoreService objectStore)
used by DS to set service reference. |
void |
unsetObjectStore(ObjectStoreService objectStore)
used by DS to remove service reference. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BUNDLE_ID
public static final java.lang.String STORENAME
| Constructor Detail |
|---|
public ObjectStoreDeltaService()
| Method Detail |
|---|
protected void activate(ComponentContext context)
protected void deactivate(ComponentContext context)
public State checkState(java.lang.String sourceId,
java.lang.String recordId,
java.lang.String jobRunId,
java.lang.String hashCode)
throws DeltaException
DeltaServiceState.UPTODATE the
service also marks the record as visited in the current crawl job run already, so there is no need to call
DeltaService.markAsUpdated(String, String, String, String) afterwards. In the other cases the crawler should call
DeltaService.markAsUpdated(String, String, String, String) only if the record is actually submitted to a processing
job.
checkState in interface DeltaServicesourceId - the name of the data source that contains the record.recordId - the record idjobRunId - the current job run id in which the crawler is running.hashCode - a string that reflects changes in the record content. This can be as simple as a version identifier if
such is available in record metadata, or even a hash calculated on the actual content of the record.
State value.
DeltaException
public void markAsUpdated(java.lang.String sourceId,
java.lang.String recordId,
java.lang.String jobRunId,
java.lang.String hashCode)
throws DeltaException
DeltaService
markAsUpdated in interface DeltaServicesourceId - the name of the data source that contains the record.recordId - the record idjobRunId - the current job run id in which the crawler is running.hashCode - a string that reflects changes in the record content. This can be as simple as a version identifier if
such is available in record metadata, or even a hash calculated on the actual content of the record.
DeltaException
public void clearSource(java.lang.String sourceId)
throws DeltaException
DeltaService
clearSource in interface DeltaServicesourceId - data source name.
DeltaException
public void clearAll()
throws DeltaException
DeltaService
clearAll in interface DeltaServiceDeltaException
public java.util.Collection<java.lang.String> getSourceIds()
throws DeltaException
DeltaService
getSourceIds in interface DeltaServiceDeltaException
public long countEntries(java.lang.String sourceId,
boolean countExact)
throws DeltaException
countEntries in interface DeltaServicecountExact - set to true to get an exact reault, but this may take some time. Else the service may return only an
estimated value.
DeltaExceptionpublic void setObjectStore(ObjectStoreService objectStore)
public void unsetObjectStore(ObjectStoreService objectStore)
|
SMILA 1.0 API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||