SMILA (incubation) API documentation

org.eclipse.smila.connectivity.impl
Class ConnectivityManagerImpl

java.lang.Object
  extended by org.eclipse.smila.connectivity.impl.ConnectivityManagerImpl
All Implemented Interfaces:
ConnectivityManager

public class ConnectivityManagerImpl
extends java.lang.Object
implements ConnectivityManager

The Class ConnectivityManagerImpl.


Field Summary
 
Fields inherited from interface org.eclipse.smila.connectivity.ConnectivityManager
HASH_TOKEN
 
Constructor Summary
ConnectivityManagerImpl()
          Default Constructor.
 
Method Summary
 int add(Record[] records)
          Put the given records for further processing to the ADD Queue.
 boolean[] checkForUpdate(Record[] diData)
          Checks for each DeltaIndexing data, if it needs to be updated in the system.
 void clearDeltaIndexing()
          Administrative reset method.
 void clearDeltaIndexingByDataSourceId(java.lang.String dataSourceId)
          Administrative reset method.
 int delete(Id[] ids)
          Put the the given ids for Deletion from the system to the DELETE Queue.
 int deleteDeltaByCompoundId(Id compoundId)
          Initiates a delta delete for the given compound object ID and all it's elements.
 int deleteDeltaByDataSourceId(java.lang.String dataSourceId)
          Initiates a delta delete for the given dataSourceID.
 void finishDeltaIndexingByCompoundId(Id compoundId)
          Finishes a DeltaIndexing run for the given compoundId.
 void finishDeltaIndexingByDataSourceId(java.lang.String dataSourceId)
          Finishes a DeltaIndexing run for the given dataSourceId.
 void initDeltaIndexingByCompoundId(Id compoundId)
          Initializes a DeltaIndexing run for the given compoundId.
 void initDeltaIndexingByDataSourceId(java.lang.String dataSourceId)
          Initializes a DeltaIndexing run for the given dataSourceId.
 void setDeltaIndexingManager(DeltaIndexingManager diManager)
          Sets the DeltaIndexingManager.
 void setRouterService(Router router)
          Sets the RouterService.
 void unsetDeltaIndexingManager(DeltaIndexingManager diManager)
          Unsets the DeltaIndexingManager.
 void unsetRouterService(Router router)
          Unsets the RouterService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectivityManagerImpl

public ConnectivityManagerImpl()
Default Constructor.

Method Detail

setDeltaIndexingManager

public void setDeltaIndexingManager(DeltaIndexingManager diManager)
Sets the DeltaIndexingManager. Used by OSGi.

Parameters:
diManager - the DeltaIndexingManager to set

unsetDeltaIndexingManager

public void unsetDeltaIndexingManager(DeltaIndexingManager diManager)
Unsets the DeltaIndexingManager. Used by OSGi.

Parameters:
diManager - the DeltaIndexingManager to unset

setRouterService

public void setRouterService(Router router)
Sets the RouterService. Used by OSGi.

Parameters:
router - the RouterService to set

unsetRouterService

public void unsetRouterService(Router router)
Unsets the RouterService. Used by OSGi.

Parameters:
router - the RouterService to unset

add

public int add(Record[] records)
        throws ConnectivityException
Put the given records for further processing to the ADD Queue.

Specified by:
add in interface ConnectivityManager
Parameters:
records - a list of Record objects
Returns:
the number of records successfully added to the ADD Queue
Throws:
ConnectivityException - if any error occurs
See Also:
ConnectivityManager.add(org.eclipse.smila.datamodel.record.Record[])

delete

public int delete(Id[] ids)
           throws ConnectivityException
Put the the given ids for Deletion from the system to the DELETE Queue.

Specified by:
delete in interface ConnectivityManager
Parameters:
ids - a list of IDs to delete
Returns:
the number of ids successfully added to the DELETE Queue
Throws:
ConnectivityException - if any error occurs
See Also:
org.eclipse.smila.connectivity.ConnectivityManager#delete(org.eclipse.smila.datamodel.id.ID[])

initDeltaIndexingByDataSourceId

public void initDeltaIndexingByDataSourceId(java.lang.String dataSourceId)
                                     throws ConnectivityException
Initializes a DeltaIndexing run for the given dataSourceId.

Specified by:
initDeltaIndexingByDataSourceId in interface ConnectivityManager
Parameters:
dataSourceId - the ID of the data source
Throws:
ConnectivityException - if any error occurs
See Also:
ConnectivityManager.initDeltaIndexingByDataSourceId(java.lang.String)

initDeltaIndexingByCompoundId

public void initDeltaIndexingByCompoundId(Id compoundId)
                                   throws ConnectivityException
Initializes a DeltaIndexing run for the given compoundId. This method is used by Agents only.

Specified by:
initDeltaIndexingByCompoundId in interface ConnectivityManager
Parameters:
compoundId - the Id of the compound object
Throws:
ConnectivityException - if any error occurs if any error occurs
See Also:
ConnectivityManager.initDeltaIndexingByCompoundId(Id)

finishDeltaIndexingByDataSourceId

public void finishDeltaIndexingByDataSourceId(java.lang.String dataSourceId)
                                       throws ConnectivityException
Finishes a DeltaIndexing run for the given dataSourceId.

Specified by:
finishDeltaIndexingByDataSourceId in interface ConnectivityManager
Parameters:
dataSourceId - the ID of the data source
Throws:
ConnectivityException - if any error occurs
See Also:
ConnectivityManager.finishDeltaIndexingByDataSourceId(java.lang.String)

finishDeltaIndexingByCompoundId

public void finishDeltaIndexingByCompoundId(Id compoundId)
                                     throws ConnectivityException
Finishes a DeltaIndexing run for the given compoundId. This method is used by Agents only.

Specified by:
finishDeltaIndexingByCompoundId in interface ConnectivityManager
Parameters:
compoundId - the Id of the compound object
Throws:
ConnectivityException - if any error occurs if any error occurs
See Also:
ConnectivityManager.finishDeltaIndexingByCompoundId(Id)

checkForUpdate

public boolean[] checkForUpdate(Record[] diData)
                         throws ConnectivityException
Checks for each DeltaIndexing data, if it needs to be updated in the system. Updated means if the data is new or has changed. The positions of the returned list of boolean values matches the incoming list of Records.

Specified by:
checkForUpdate in interface ConnectivityManager
Parameters:
diData - a list of Records containing DeltaIndexing data to check
Returns:
a list of boolean values
Throws:
ConnectivityException - if any error occurs
See Also:
ConnectivityManager.checkForUpdate(org.eclipse.smila.datamodel.record.Record[])

deleteDeltaByDataSourceId

public int deleteDeltaByDataSourceId(java.lang.String dataSourceId)
                              throws ConnectivityException
Initiates a delta delete for the given dataSourceID. All DeltaIndexing records belonging to the dataSourceID, that were not marked as visited during this DeltaIndexing run are removed.

Specified by:
deleteDeltaByDataSourceId in interface ConnectivityManager
Parameters:
dataSourceId - the ID of the data source
Returns:
the number of records marked for delta-delete and successfully added to the delete Queue
Throws:
ConnectivityException - if any error occurs
See Also:
ConnectivityManager.deleteDeltaByDataSourceId(java.lang.String)

deleteDeltaByCompoundId

public int deleteDeltaByCompoundId(Id compoundId)
                            throws ConnectivityException
Initiates a delta delete for the given compound object ID and all it's elements. All DeltaIndexing records belonging to this compound object, that were not marked as visited are removed. This method is used by Agents only.

Specified by:
deleteDeltaByCompoundId in interface ConnectivityManager
Parameters:
compoundId - the ID of the compound object
Returns:
the number of records marked for delta-delete and successfully added to the delete Queue
Throws:
ConnectivityException - if any error occurs
See Also:
org.eclipse.smila.connectivity.ConnectivityManager#deleteDeltaByCompoundId(org.eclipse.smila.datamodel.id.ID)

clearDeltaIndexing

public void clearDeltaIndexing()
                        throws ConnectivityException
Administrative reset method. It removes all DeltaIndexing information.

Specified by:
clearDeltaIndexing in interface ConnectivityManager
Throws:
ConnectivityException - if any error occurs
See Also:
ConnectivityManager.clearDeltaIndexing()

clearDeltaIndexingByDataSourceId

public void clearDeltaIndexingByDataSourceId(java.lang.String dataSourceId)
                                      throws ConnectivityException
Administrative reset method. It removes all DeltaIndexing information for the given dataSourceID.

Specified by:
clearDeltaIndexingByDataSourceId in interface ConnectivityManager
Parameters:
dataSourceId - the ID of the data source
Throws:
ConnectivityException - if any error occurs
See Also:
ConnectivityManager.clearDeltaIndexingByDataSourceId(java.lang.String)

SMILA (incubation) API documentation