public class PVCacheImpl extends Object implements PVCache, DataStorageListener
PVCache first implementation. Handles the communication between a
 list of sources, a storage and registered queries threw
 PVCacheListener. Manages a list of requested intervals which are
 intersected with new requested TimeInterval. Manages a list a
 completed intervals which is the result of the concatenation of the lists of
 completed intervals per sources. When data is lost from storage, the
 IntervalsList generated from the TimestampsSet is subtracted
 to all requested/completed intervals lists.| Constructor and Description | 
|---|
| PVCacheImpl(String channelName,
           Collection<DataSource> dataSources,
           DataStorage storage) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addListener(PVCacheListener listener)Add a  PVCacheListenerto be notified when new samples are
 available. | 
| void | dataLoss(TimestampsSet lostSet)Informs that the specified set of  Timestamphave been removed
 from storage. | 
| String | getChannelName() | 
| IntervalsList | getCompletedIntervalsList()Get the completed intervals list. | 
| PVCacheStatistics | getStatistics() | 
| boolean | isProcessingSources() | 
| boolean | isStatisticsEnabled() | 
| void | removeListener(PVCacheListener listener)Remove a  PVCacheListener. | 
| DataRequestThread | retrieveDataAsync(org.epics.util.time.TimeInterval interval)Asynchronously retrieves samples from sources for the requested
  TimeIntervaland asynchronously requestsDataStoragefor
 immediately available samples. | 
| SortedSet<Data> | retrieveDataSync(org.epics.util.time.TimeInterval interval)Synchronously requests  DataStoragefor immediately available
 samples. | 
| void | setStatisticsEnabled(boolean enabled) | 
| void | startLiveDataProcessing()Start processing live data samples. | 
| void | stopLiveDataProcessing()Stop processing live data samples. | 
public PVCacheImpl(String channelName, Collection<DataSource> dataSources, DataStorage storage)
public void startLiveDataProcessing()
startLiveDataProcessing in interface PVCachepublic void stopLiveDataProcessing()
stopLiveDataProcessing in interface PVCachepublic void addListener(PVCacheListener listener)
PVCacheListener to be notified when new samples are
 available.addListener in interface PVCachelistener - to be addedpublic void removeListener(PVCacheListener listener)
PVCacheListener.removeListener in interface PVCachelistener - to be removedpublic DataRequestThread retrieveDataAsync(org.epics.util.time.TimeInterval interval)
TimeInterval and asynchronously requests DataStorage for
 immediately available samples.retrieveDataAsync in interface PVCacheinterval - TimeInterval to be retrieved.public SortedSet<Data> retrieveDataSync(org.epics.util.time.TimeInterval interval)
DataStorage for immediately available
 samples.retrieveDataSync in interface PVCacheinterval - TimeInterval to be retrieved.public void dataLoss(TimestampsSet lostSet)
Timestamp have been removed
 from storage.dataLoss in interface DataStorageListenerlostSet - TimestampsSet of lost Timestamp.public IntervalsList getCompletedIntervalsList()
TimeInterval is completed
 when all DataSource have finished responding.getCompletedIntervalsList in interface PVCacheIntervalsList the list of completed intervals.public void setStatisticsEnabled(boolean enabled)
setStatisticsEnabled in interface PVCachepublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface PVCachepublic PVCacheStatistics getStatistics()
getStatistics in interface PVCachepublic boolean isProcessingSources()
public String getChannelName()
Copyright © 2010–2015. All rights reserved.