SMILA (incubation) API documentation

org.eclipse.smila.connectivity.deltaindexing.impl
Class DeltaIndexingManagerImpl

java.lang.Object
  extended by org.eclipse.smila.connectivity.deltaindexing.impl.DeltaIndexingManagerImpl
All Implemented Interfaces:
DeltaIndexingManager

public class DeltaIndexingManagerImpl
extends java.lang.Object
implements DeltaIndexingManager

The Class DeltaIndexingManagerImpl. It was done only for testing purposes.


Constructor Summary
DeltaIndexingManagerImpl()
           
 
Method Summary
protected  void activate(ComponentContext context)
          Activate.
 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.
protected  void deactivate(ComponentContext context)
          OSGi Declarative Services service deactivation method.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeltaIndexingManagerImpl

public DeltaIndexingManagerImpl()
Method Detail

activate

protected void activate(ComponentContext context)
Activate.

Parameters:
context - the context

deactivate

protected void deactivate(ComponentContext context)
OSGi Declarative Services service deactivation method. Shuts down BPEL engine.

Parameters:
context - OSGi service component context.

checkForUpdate

public 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

Specified by:
checkForUpdate in interface DeltaIndexingManager
Parameters:
id - the id
hash - the hash
Returns:
true, if check for update
Throws:
DeltaIndexingException
See Also:
checkForUpdate(org.eclipse.smila.datamodel.id.Id, java.lang.String)

finish

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

Specified by:
finish in interface DeltaIndexingManager
Parameters:
dataSourceID - the data source id
Throws:
DeltaIndexingException
See Also:
DeltaIndexingManager.finish(java.lang.String)

init

public 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.

Specified by:
init in interface DeltaIndexingManager
Parameters:
dataSourceID - dataSourceID
Throws:
DeltaIndexingException
See Also:
DeltaIndexingManager.init(java.lang.String)

visit

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

Specified by:
visit in interface DeltaIndexingManager
Parameters:
id - the id
hash - the hash
Throws:
DeltaIndexingException
See Also:
DeltaIndexingManager.visit(org.eclipse.smila.datamodel.id.Id, java.lang.String)

obsoleteIdIterator

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

Specified by:
obsoleteIdIterator in interface DeltaIndexingManager
Parameters:
dataSourceID - the data source id
Returns:
the iterator< id>
Throws:
DeltaIndexingException
See Also:
DeltaIndexingManager.obsoleteIdIterator(java.lang.String)

rollback

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

Specified by:
rollback in interface DeltaIndexingManager
Parameters:
dataSourceID - the data source id
Throws:
DeltaIndexingException
See Also:
DeltaIndexingManager.rollback(java.lang.String)

delete

public void delete(Id id)
            throws DeltaIndexingException
Delete.

Specified by:
delete in interface DeltaIndexingManager
Parameters:
id - the id
Throws:
DeltaIndexingException
See Also:
DeltaIndexingManager.delete(org.eclipse.smila.datamodel.id.Id)

obsoleteIdIterator

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

Specified by:
obsoleteIdIterator in interface DeltaIndexingManager
Parameters:
id - the id
Returns:
the iterator< id>
See Also:
obsoleteIdIterator(org.eclipse.smila.datamodel.id.Id)

unlockDatasources

public void unlockDatasources()
Unlock all datasources.

Specified by:
unlockDatasources in interface DeltaIndexingManager
See Also:
DeltaIndexingManager.unlockDatasources()

clear

public void clear()
           throws DeltaIndexingException
Clear.

Specified by:
clear in interface DeltaIndexingManager
Throws:
DeltaIndexingException - the delta indexing exception
See Also:
DeltaIndexingManager.clear()

clear

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

Specified by:
clear in interface DeltaIndexingManager
Parameters:
dataSourceID - the data source id
Throws:
DeltaIndexingException - the delta indexing exception
See Also:
DeltaIndexingManager.clear(java.lang.String)

exists

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

Specified by:
exists in interface DeltaIndexingManager
Parameters:
dataSourceId - the data source id
Returns:
true, if successful
See Also:
DeltaIndexingManager.exists(java.lang.String)

SMILA (incubation) API documentation