com.endeca.cas.extension
Class DataSourceRuntime
java.lang.Object
com.endeca.cas.extension.PipelineComponentRuntime
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:
- The DataSourceRuntime is created by
DataSource.createDataSourceRuntime(PipelineComponentConfiguration, PipelineComponentRuntimeContext)
.
- 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.
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
Method Summary |
abstract void |
runFullAcquisition()
Runs a full acquisition from the data source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataSourceRuntime
public DataSourceRuntime(PipelineComponentRuntimeContext context)
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.