public class AggregatingSubscriptionManager extends AbstractSubscriptionManager
Modifier and Type | Class and Description |
---|---|
static interface |
AggregatingSubscriptionManager.Listener |
Modifier and Type | Field and Description |
---|---|
protected ScheduledExecutorService |
executor |
cache, started
Constructor and Description |
---|
AggregatingSubscriptionManager(ScheduledExecutorService executor,
HiveSource hiveSource,
Properties properties,
String logName)
Create a new subscription manager
|
AggregatingSubscriptionManager(ScheduledExecutorService executor,
HiveSource hiveSource,
Properties properties,
String logName,
AggregatingSubscriptionManager.Listener listener)
Create a new subscription manager
|
Modifier and Type | Method and Description |
---|---|
protected void |
clearCache() |
protected void |
putState(String itemId,
DataItemValue value) |
void |
stop() |
void |
subscribe(String itemId)
Subscribe to an item
|
void |
subscribeAll(Set<String> itemIds)
Subscribe to multiple items
|
void |
unsubscribe(String itemId) |
bind, getCacheCopy, getCacheValue, getSortedCacheCopy, handleCreateSessionResult, handleDataChanged, handleSubscriptionChanged, performSetHive, start, unbind, writeAttributes, writeValue
protected final ScheduledExecutorService executor
public AggregatingSubscriptionManager(ScheduledExecutorService executor, HiveSource hiveSource, Properties properties, String logName, AggregatingSubscriptionManager.Listener listener)
executor
- a single threaded executorhiveSource
- the source of the hive to attach toproperties
- the session properties for the hivelogName
- An optional name of the actor, which will be used for logginglistener
- optionally a listener that will get a call when any of the
values in the cache changedpublic AggregatingSubscriptionManager(ScheduledExecutorService executor, HiveSource hiveSource, Properties properties, String logName)
executor
- a single threaded executorhiveSource
- the source of the hive to attach toproperties
- the session properties for the hivelogName
- An optional name of the actor, which will be used for loggingpublic void stop()
stop
in class AbstractSubscriptionManager
protected void clearCache()
clearCache
in class AbstractSubscriptionManager
protected void putState(String itemId, DataItemValue value)
putState
in class AbstractSubscriptionManager
public void subscribe(String itemId)
AbstractSubscriptionManager
Subscriptions may only be made after the manager was started using
AbstractSubscriptionManager.start()
.
subscribe
in class AbstractSubscriptionManager
itemId
- id of the item to subscribe topublic void unsubscribe(String itemId)
unsubscribe
in class AbstractSubscriptionManager
public void subscribeAll(Set<String> itemIds)
AbstractSubscriptionManager
Subscriptions may only be made after the manager was started using
AbstractSubscriptionManager.start()
.
subscribeAll
in class AbstractSubscriptionManager
itemIds
- the ids of the items to subscribe toCopyright © 2016 Eclipse NeoSCADA Project. All rights reserved.