|
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.connectivity.deltaindexing.impl.DeltaIndexingManagerImpl
public class DeltaIndexingManagerImpl
The Class DeltaIndexingManagerImpl. It was done only for testing purposes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.smila.connectivity.deltaindexing.DeltaIndexingManager |
---|
DeltaIndexingManager.LockState |
Constructor Summary | |
---|---|
DeltaIndexingManagerImpl()
|
Method Summary | |
---|---|
protected void |
activate(ComponentContext context)
Activate. |
boolean |
checkForUpdate(java.lang.String sessionId,
ConnectivityId id,
java.lang.String hash)
checks if the hash of the current id is new or has changed (true) or not (false). // to reduce method calls mark entry as visited on return value false |
void |
clear()
Clears all entries of the DeltaIndexingManager including any active sessions! |
void |
clear(java.lang.String sessionId)
Clear all entries for the given sessionId. |
protected void |
deactivate(ComponentContext context)
OSGi Declarative Services service deactivation method. |
void |
delete(java.lang.String sessionId,
ConnectivityId id)
Delete. |
boolean |
exists(java.lang.String dataSourceId)
Checks if the entries for the given dataSourceId exist. |
void |
finish(java.lang.String sessionId)
Finish this delta indexing session and remove the lock. |
long |
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. |
java.util.Map<java.lang.String,DeltaIndexingManager.LockState> |
getLockStates()
Get an overview what data sources are locked or unlocked. |
java.lang.String |
init(java.lang.String dataSourceID)
Initializes the internal state for an import of a dataSourceID and creates a session wherein it establishes a lock to avoid that the same. dataSourceID is initialized multiple times concurrently. |
java.util.Iterator<ConnectivityId> |
obsoleteIdIterator(java.lang.String sessionId,
ConnectivityId id)
Obsolete id iterator for id fragments of compounds. |
java.util.Iterator<ConnectivityId> |
obsoleteIdIterator(java.lang.String sessionId,
java.lang.String dataSourceID)
Obsolete id iterator. |
void |
rollback(java.lang.String sessionId)
rolls back changes that were made in the current session between init() and finish(), it should be called before finishing process. |
void |
unlockDatasource(java.lang.String dataSourceID)
Unlock the given data source and removes the sessions. |
void |
unlockDatasources()
Unlock all data sources and removes all sessions. |
void |
visit(java.lang.String sessionId,
ConnectivityId id,
java.lang.String hash,
boolean isCompound)
Creates or updates the delta indexing entry. this is THE method to make the record known to DI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeltaIndexingManagerImpl()
Method Detail |
---|
protected void activate(ComponentContext context)
context
- the contextprotected void deactivate(ComponentContext context)
context
- OSGi service component context.public boolean checkForUpdate(java.lang.String sessionId, ConnectivityId id, java.lang.String hash) throws DeltaIndexingSessionException, DeltaIndexingException
checkForUpdate
in interface DeltaIndexingManager
sessionId
- the id of the delta indexing sessionid
- the idhash
- the hash
DeltaIndexingException
DeltaIndexingSessionException
- if the sessionId is invalidorg.eclipse.smila.connectivity.deltaindexing.DeltaIndexingManager#checkForUpdate(String, Id, String)}
public void finish(java.lang.String sessionId) throws DeltaIndexingSessionException, DeltaIndexingException
finish
in interface DeltaIndexingManager
sessionId
- the id of the delta indexing session
DeltaIndexingException
DeltaIndexingSessionException
- if the sessionId is invalidDeltaIndexingManager.finish(java.lang.String)
public java.lang.String init(java.lang.String dataSourceID) throws DeltaIndexingException
init
in interface DeltaIndexingManager
dataSourceID
- dataSourceID
DeltaIndexingException
DeltaIndexingManager.init(java.lang.String)
public void visit(java.lang.String sessionId, ConnectivityId id, java.lang.String hash, boolean isCompound) throws DeltaIndexingSessionException, DeltaIndexingException
visit
in interface DeltaIndexingManager
sessionId
- the id of the delta indexing sessionid
- the idhash
- the hashisCompound
- boolean flag if the record identified by id is a compound record (true) or not (false)
DeltaIndexingException
DeltaIndexingSessionException
- if the sessionId is invalidorg.eclipse.smila.connectivity.deltaindexing.DeltaIndexingManager#visit(String, Id, String, boolean)}
public java.util.Iterator<ConnectivityId> obsoleteIdIterator(java.lang.String sessionId, java.lang.String dataSourceID) throws DeltaIndexingSessionException, DeltaIndexingException
obsoleteIdIterator
in interface DeltaIndexingManager
sessionId
- the id of the delta indexing sessiondataSourceID
- the data source id
DeltaIndexingException
DeltaIndexingSessionException
- if the sessionId is invalidorg.eclipse.smila.connectivity.deltaindexing.DeltaIndexingManager#obsoleteIdIterator(String, String)}
public void rollback(java.lang.String sessionId) throws DeltaIndexingException
rollback
in interface DeltaIndexingManager
sessionId
- the id of the delta indexing session
DeltaIndexingException
org.eclipse.smila.connectivity.deltaindexing.DeltaIndexingManager#rollback(String)}
public void delete(java.lang.String sessionId, ConnectivityId id) throws DeltaIndexingSessionException, DeltaIndexingException
delete
in interface DeltaIndexingManager
sessionId
- the id of the delta indexing sessionid
- the id
DeltaIndexingException
DeltaIndexingSessionException
- if the sessionId is invalidorg.eclipse.smila.connectivity.deltaindexing.DeltaIndexingManager#delete(String, Id)}
public java.util.Iterator<ConnectivityId> obsoleteIdIterator(java.lang.String sessionId, ConnectivityId id)
obsoleteIdIterator
in interface DeltaIndexingManager
sessionId
- the id of the delta indexing sessionid
- the id
obsoleteIdIterator(String, Id)
public void unlockDatasource(java.lang.String dataSourceID) throws DeltaIndexingException
unlockDatasource
in interface DeltaIndexingManager
dataSourceID
- the data source id
DeltaIndexingException
- the delta indexing exceptionDeltaIndexingManager.unlockDatasource(String)
public void unlockDatasources()
unlockDatasources
in interface DeltaIndexingManager
DeltaIndexingManager.unlockDatasources()
public java.util.Map<java.lang.String,DeltaIndexingManager.LockState> getLockStates()
getLockStates
in interface DeltaIndexingManager
DeltaIndexingManager.getLockStates()
public void clear() throws DeltaIndexingException
clear
in interface DeltaIndexingManager
DeltaIndexingException
- the delta indexing exceptionDeltaIndexingManager.clear()
public void clear(java.lang.String sessionId) throws DeltaIndexingSessionException, DeltaIndexingException
clear
in interface DeltaIndexingManager
sessionId
- the id of the delta indexing session
DeltaIndexingSessionException
- if the sessionId is invalid
DeltaIndexingException
- the delta indexing exceptionDeltaIndexingManager.clear(java.lang.String)
public boolean exists(java.lang.String dataSourceId)
exists
in interface DeltaIndexingManager
dataSourceId
- the data source id
DeltaIndexingManager.exists(java.lang.String)
public long getEntryCount(java.lang.String dataSourceId)
getEntryCount
in interface DeltaIndexingManager
dataSourceId
- the data source id
DeltaIndexingManager.getEntryCount(String)
public java.util.Map<java.lang.String,java.lang.Long> getEntryCounts()
getEntryCounts
in interface DeltaIndexingManager
DeltaIndexingManager.getEntryCounts()
|
SMILA 1.0 API documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |