SMILA (incubation) API documentation

org.eclipse.smila.connectivity.deltaindexing
Interface DeltaIndexingManager

All Known Implementing Classes:
DeltaIndexingManagerImpl, DeltaIndexingManagerImpl

public interface DeltaIndexingManager

The Interface DeltaIndexingManager.


Method Summary
 boolean checkForUpdate(Id id, java.lang.String hash)
          checks for 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()
          Clear.
 void clear(java.lang.String dataSourceID)
          Clear.
 void delete(Id id)
          Delete.
 boolean exists(java.lang.String dataSourceId)
          Exists.
 void finish(java.lang.String dataSourceID)
          removes the lock.
 void init(java.lang.String dataSourceID)
          initializes the internal state for an import of a dataSourceID and establishes a lock to avoid that the same.
 java.util.Iterator<Id> obsoleteIdIterator(Id id)
          Obsolete id iterator for id fragments.
 java.util.Iterator<Id> obsoleteIdIterator(java.lang.String dataSourceID)
          Obsolete id iterator.
 void rollback(java.lang.String dataSourceID)
          rollbacks changes was made inside init() and finish(), it should be called before finishing process.
 void unlockDatasources()
          Unlock all datasources.
 void visit(Id id, java.lang.String hash)
          updates the hash and marks this id as visited.
 

Method Detail

init

void init(java.lang.String dataSourceID)
          throws DeltaIndexingException
initializes the internal state for an import of a dataSourceID and establishes a lock to avoid that the same. dataSourceID ist initialized multiple times concurrently.

Parameters:
dataSourceID - dataSourceID
Throws:
DeltaIndexingException - the delta indexing exception

checkForUpdate

boolean checkForUpdate(Id id,
                       java.lang.String hash)
                       throws DeltaIndexingException
checks for 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

Parameters:
id - the id
hash - the hash
Returns:
true, if check for update
Throws:
DeltaIndexingException - the delta indexing exception

visit

void visit(Id id,
           java.lang.String hash)
           throws DeltaIndexingException
updates the hash and marks this id as visited.

Parameters:
id - the id
hash - the hash
Throws:
DeltaIndexingException - the delta indexing exception

obsoleteIdIterator

java.util.Iterator<Id> obsoleteIdIterator(java.lang.String dataSourceID)
                                          throws DeltaIndexingException
Obsolete id iterator.

Parameters:
dataSourceID - the data source id
Returns:
the iterator< id>
Throws:
DeltaIndexingException - the delta indexing exception

obsoleteIdIterator

java.util.Iterator<Id> obsoleteIdIterator(Id id)
                                          throws DeltaIndexingException
Obsolete id iterator for id fragments.

Parameters:
id - the id
Returns:
the iterator< id>
Throws:
DeltaIndexingException - the delta indexing exception

clear

void clear()
           throws DeltaIndexingException
Clear.

Throws:
DeltaIndexingException - the delta indexing exception

clear

void clear(java.lang.String dataSourceID)
           throws DeltaIndexingException
Clear.

Parameters:
dataSourceID - the data source id
Throws:
DeltaIndexingException - the delta indexing exception

rollback

void rollback(java.lang.String dataSourceID)
              throws DeltaIndexingException
rollbacks changes was made inside init() and finish(), it should be called before finishing process.

Parameters:
dataSourceID - the data source id
Throws:
DeltaIndexingException - the delta indexing exception

delete

void delete(Id id)
            throws DeltaIndexingException
Delete.

Parameters:
id - the id
Throws:
DeltaIndexingException - the delta indexing exception

finish

void finish(java.lang.String dataSourceID)
            throws DeltaIndexingException
removes the lock.

Parameters:
dataSourceID - the data source id
Throws:
DeltaIndexingException - the delta indexing exception

unlockDatasources

void unlockDatasources()
                       throws DeltaIndexingException
Unlock all datasources.

Throws:
DeltaIndexingException - the delta indexing exception

exists

boolean exists(java.lang.String dataSourceId)
Exists.

Parameters:
dataSourceId - the data source id
Returns:
true, if successful

SMILA (incubation) API documentation