com.endeca.cas.extension
Class DataSourceRuntime

java.lang.Object
  extended by com.endeca.cas.extension.PipelineComponentRuntime
      extended by com.endeca.cas.extension.DataSourceRuntime

public abstract class DataSourceRuntime
extends PipelineComponentRuntime

The runtime representation of a data source instance. A new instance of a DataSourceRuntime is created for every acquisition.

The general life cycle of a DataSourceRuntime is:

  1. The DataSourceRuntime is created by DataSource.createDataSourceRuntime(PipelineComponentConfiguration, PipelineComponentRuntimeContext).
  2. If all data sources and manipulators return false from checkFullAcquisitionRequired() IncrementalDataSourceRuntime.runIncrementalAcquisition() is called to output the records from the data source, otherwise runFullAcquisition() is called to output the records from the data source.
  3. PipelineComponentRuntime.endAcquisition(AcquisitionEndState) is called to clean up any resources used by the runtime.

Subclasses must be thread-safe. The CAS Server will invoke methods on this class from multiple-threads and potentially concurrently. Access to any mutable state must be properly synchronized.

See Also:
IncrementalDataSourceRuntime

Constructor Summary
DataSourceRuntime(PipelineComponentRuntimeContext context)
           
 
Method Summary
abstract  void runFullAcquisition()
          Runs a full acquisition from the data source.
 
Methods inherited from class com.endeca.cas.extension.PipelineComponentRuntime
endAcquisition, getContext, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceRuntime

public DataSourceRuntime(PipelineComponentRuntimeContext context)
Method Detail

runFullAcquisition

public abstract void runFullAcquisition()
                                 throws FatalExecutionException
Runs a full acquisition from the data source. Implementations should output Records using the OutputChannel obtained from the PipelineComponentRuntimeContext. This method is invoked once for a given acquisition.

Any Exceptions thrown from this method, including RuntimeExceptions, cause the acquisition to fail.

Throws:
FatalExecutionException - If the DataSourceRuntime detects an error that should cause the acquisition to abort.
See Also:
PipelineComponentRuntime.stop()


Copyright © 2007, 2012, Oracle and/or its affiliates. All rights reserved.