public interface PVCache
DataSource
interface and stores them into storage via
DataStorage
interface. Notifies the registered
PVCacheListener
when new samples have been retrieved. Manages the
lists of requested/completed intervals.Modifier and Type | Method and Description |
---|---|
void |
addListener(PVCacheListener listener)
Add a
PVCacheListener to be notified when new samples are
available. |
void |
flush() |
String |
getChannelName() |
IntervalsList |
getCompletedIntervalsList()
Get the completed intervals list.
|
PVCacheStatistics |
getStatistics() |
boolean |
isProcessingSources() |
boolean |
isStatisticsEnabled() |
void |
removeListener(PVCacheListener listener)
Remove a
PVCacheListener . |
DataRequestThread |
retrieveDataAsync(TimeInterval interval)
Asynchronously retrieves samples from sources for the requested
TimeInterval and asynchronously requests DataStorage for
immediately available samples. |
SortedSet<Data> |
retrieveDataSync(TimeInterval interval)
Synchronously requests
DataStorage for immediately available
samples. |
void |
setStatisticsEnabled(boolean enabled) |
void |
startLiveDataProcessing()
Start processing live data samples.
|
void |
stopLiveDataProcessing()
Stop processing live data samples.
|
void startLiveDataProcessing()
void stopLiveDataProcessing()
void addListener(PVCacheListener listener)
PVCacheListener
to be notified when new samples are
available.listener
- to be addedvoid removeListener(PVCacheListener listener)
PVCacheListener
.listener
- to be removedDataRequestThread retrieveDataAsync(TimeInterval interval)
TimeInterval
and asynchronously requests DataStorage
for
immediately available samples.interval
- TimeInterval
to be retrieved.SortedSet<Data> retrieveDataSync(TimeInterval interval)
DataStorage
for immediately available
samples.interval
- TimeInterval
to be retrieved.IntervalsList getCompletedIntervalsList()
TimeInterval
is completed
when all DataSource
have finished responding.IntervalsList
the list of completed intervals.void setStatisticsEnabled(boolean enabled)
boolean isStatisticsEnabled()
PVCacheStatistics getStatistics()
boolean isProcessingSources()
String getChannelName()
void flush()
Copyright © 2015. All rights reserved.