Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/ConnectivityManager"

Line 6: Line 6:
  
 
<source lang="java">
 
<source lang="java">
 +
/**
 +
* The Interface ConnectivityManager.
 +
*/
 
public interface ConnectivityManager {
 
public interface ConnectivityManager {
    
+
 
 +
   /**
 +
  * Record annotation jobId.
 +
  */
 +
  String ANNOTATION_JOB_ID = "jobId";
 +
 
 
   /**
 
   /**
 
   * Put the given records for further processing to the ADD Queue.
 
   * Put the given records for further processing to the ADD Queue.
Line 31: Line 39:
 
   * @throws ConnectivityException
 
   * @throws ConnectivityException
 
   *          if any error occurs
 
   *          if any error occurs
 +
  * @deprecated this method is deprecated, as we realized that it may be relevant to send additional information for
 +
  *            deletion with the Id, e.g. annotations to process in the delete pipeline. Therefore use the method with
 +
  *            records instead.
 
   */
 
   */
 
   int delete(Id[] ids) throws ConnectivityException;
 
   int delete(Id[] ids) throws ConnectivityException;
 +
 +
  /**
 +
  * Put the the given records for Deletion from the system to the DELETE Queue.
 +
  *
 +
  * @param records
 +
  *          a list of records to delete
 +
  *
 +
  * @return the number of records successfully added to the DELETE Queue
 +
  *
 +
  * @throws ConnectivityException
 +
  *          if any error occurs
 +
  */
 +
  int delete(Record[] records) throws ConnectivityException;
 
}
 
}
 +
 
</source>
 
</source>
  

Revision as of 04:04, 14 August 2009

Overview

The Connectivity Manager is the single point of entry for data in the SMILA. It's functionality is divided into several Sub-Components for better modularization. The Connectivity Manager and its Sub-Components are implemented as Java OSGi services.

API

/**
 * The Interface ConnectivityManager.
 */
public interface ConnectivityManager {
 
  /**
   * Record annotation jobId.
   */
  String ANNOTATION_JOB_ID = "jobId";
 
  /**
   * Put the given records for further processing to the ADD Queue.
   * 
   * @param records
   *          a list of Record objects
   * 
   * @return the number of records successfully added to the ADD Queue
   * 
   * @throws ConnectivityException
   *           if any error occurs
   */
  int add(Record[] records) throws ConnectivityException;
 
  /**
   * Put the the given ids for Deletion from the system to the DELETE Queue.
   * 
   * @param ids
   *          a list of IDs to delete
   * 
   * @return the number of ids successfully added to the DELETE Queue
   * 
   * @throws ConnectivityException
   *           if any error occurs
   * @deprecated this method is deprecated, as we realized that it may be relevant to send additional information for
   *             deletion with the Id, e.g. annotations to process in the delete pipeline. Therefore use the method with
   *             records instead.
   */
  int delete(Id[] ids) throws ConnectivityException;
 
  /**
   * Put the the given records for Deletion from the system to the DELETE Queue.
   * 
   * @param records
   *          a list of records to delete
   * 
   * @return the number of records successfully added to the DELETE Queue
   * 
   * @throws ConnectivityException
   *           if any error occurs
   */
  int delete(Record[] records) throws ConnectivityException;
}

Implementations

It is possible to provide different implementations for the ConnectivityManager interface. At the moment there is one implementation available.

org.eclipse.smila.connectivity.impl

This bundle contains the default implementation of the ConnectivityManager interface.

The ConnectivityManagerImpl contains the core execution logic as it does the actual processing of the incoming requests. Incoming Record objects are split into different parts:

  • metadata (record attributes) is stored via the Blackboard Service in the RecordStorage
  • attachments are stored via the Blackboard Service in the BinaryStorage
  • a message object is added to a Queue containing the record Id and optional any additional metadata

This chart shows the Connectivity Manager implementation, it's Sub-Components and the relationship to other components: ConnectivityManager.png

Sub-Components

Router

The Router routes messages to the Queue(s) according to it's configuration. See SMILA/Documentation/QueueWorker for more information.


Buffer

Not yet implemented.


Configuration

There are no configuration options available for this bundle.