|
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.ObjectStoreVisitedLinksService
public class ObjectStoreVisitedLinksService
ObjectStore based implementation of the VisitedLinksService 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 | |
|---|---|
ObjectStoreVisitedLinksService()
|
|
| Method Summary | |
|---|---|
protected void |
activate(ComponentContext context)
service activation. |
boolean |
checkAndMarkVisited(java.lang.String sourceId,
java.lang.String url,
java.lang.String jobRunId,
java.lang.String inputBulkId)
Determines if the link was already visited for this sourceId. |
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 VisitedLinksService. |
boolean |
isVisited(java.lang.String sourceId,
java.lang.String url,
java.lang.String jobRunId)
Determines if the link was already visited for this sourceId in the same job run or not. |
void |
markAsVisited(java.lang.String sourceId,
java.lang.String url,
java.lang.String jobRunId,
java.lang.String inputBulkId)
Mark the link 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 ObjectStoreVisitedLinksService()
| Method Detail |
|---|
protected void activate(ComponentContext context)
protected void deactivate(ComponentContext context)
public boolean checkAndMarkVisited(java.lang.String sourceId,
java.lang.String url,
java.lang.String jobRunId,
java.lang.String inputBulkId)
throws VisitedLinksException
VisitedLinksService
checkAndMarkVisited in interface VisitedLinksServicesourceId - the name of the data source that contains the link.url - the link to check, e.g. an URL.jobRunId - the current job run id in which the crawler is running.inputBulkId - the id of the inputBulk where the URL to check originates from.
VisitedLinksException
public boolean isVisited(java.lang.String sourceId,
java.lang.String url,
java.lang.String jobRunId)
throws VisitedLinksException
VisitedLinksService
isVisited in interface VisitedLinksServicesourceId - the name of the data source that contains the link.url - the link to check, e.g. an URL.jobRunId - the current job run id in which the crawler is running.
VisitedLinksException
public void markAsVisited(java.lang.String sourceId,
java.lang.String url,
java.lang.String jobRunId,
java.lang.String inputBulkId)
throws VisitedLinksException
VisitedLinksService
markAsVisited in interface VisitedLinksServicesourceId - the name of the data source that contains the link.url - the link to mark, e.g. an URL.jobRunId - the current job run id in which the crawler is running.inputBulkId - the id of the inputBulk where the URL to mark originates from.
VisitedLinksException
public void clearSource(java.lang.String sourceId)
throws VisitedLinksException
VisitedLinksService
clearSource in interface VisitedLinksServicesourceId - data source name.
VisitedLinksException
public void clearAll()
throws VisitedLinksException
VisitedLinksService
clearAll in interface VisitedLinksServiceVisitedLinksException
public java.util.Collection<java.lang.String> getSourceIds()
throws VisitedLinksException
VisitedLinksService
getSourceIds in interface VisitedLinksServiceVisitedLinksException
public long countEntries(java.lang.String sourceId,
boolean countExact)
throws DeltaException
countEntries in interface VisitedLinksServicecountExact - 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 | ||||||||