Package gda.scan
Class DataPointCache
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.scan.DataPointCache
- All Implemented Interfaces:
Configurable,Findable,IScanDataPointObserver,gda.observable.IObserver
- Direct Known Subclasses:
ScanDataPointCache,SortedScanDataPointCache
public abstract class DataPointCache
extends FindableConfigurableBase
implements IScanDataPointObserver
Base class for IScanDataPoint caches. Initialises at the start of each scan and then
adds each point in turn.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidAdd aIScanDataPointto this cache.voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.getPositionsFor(String scannableName) Extract a list of values for the given field name from the cached data.protected voidinitialise(IScanDataPoint sdp) Run any initialisation required at the start of a scan.voidMethods inherited from class gda.factory.FindableConfigurableBase
getName, setNameMethods inherited from class gda.factory.ConfigurableBase
isConfigureAtStartup, isConfigured, reconfigure, setConfigured
-
Constructor Details
-
DataPointCache
public DataPointCache()
-
-
Method Details
-
getPositionsFor
Extract a list of values for the given field name from the cached data.- Parameters:
scannableName- The field name for which to extract data- Returns:
- A list of positions for the given field
-
addDataPoint
Add aIScanDataPointto this cache. This will be called whenever a data point is produced by theIScanDataPointProviderthis is observing.- Parameters:
sdp- The newIScanDataPointto cache
-
initialise
Run any initialisation required at the start of a scan. This will be called with the first point (where the currentPointNumber == 0) of each scan.- Parameters:
sdp- The firstIScanDataPointof the scan
-
update
- Specified by:
updatein interfacegda.observable.IObserver
-
configure
public void configure()Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase
-