public class DatasourceTagManager extends java.lang.Object implements ClientSubManager, ComplexTypeManager
TagManagerBase.CollisionPolicy
Constructor and Description |
---|
DatasourceTagManager(java.util.concurrent.ScheduledExecutorService executor,
int delay,
StatMetric pollingMetric,
StatMetric loadMetric,
StatMetric valueChangeMetric) |
Modifier and Type | Method and Description |
---|---|
void |
addTags(TagPath parentFolder,
java.util.List<TagNode> tags,
TagManagerBase.CollisionPolicy policy)
Adds the given tags into the parent folder.
|
java.util.List<Tag> |
browse(TagPath path)
Returns the tags at a given path.
|
java.util.List<Tag> |
browseDataTypes(TagPath root)
Returns data types and folders defined under the given path.
|
void |
editTags(java.util.List<TagPath> paths,
TagDiff edit)
Applies the given TagDiff edit to the paths indicated
|
int |
getDependantCount(TagPath typePath)
This works by calling a special browse function on the gateway, which returns an integer meta tag with the return
value.
|
protected TagPath |
getParentTypePath(Tag tag) |
Tag |
getTag(TagPath aPath)
Returns the tag located at a specific path.
|
TagDiagnostics |
getTagDiagnostics(TagPath path)
Returns the current diagnostic information for a given path.
|
java.util.List<Tag> |
getTags(java.util.List<TagPath> paths) |
ComplexTag |
getTypeDefinition(TagPath typePath) |
boolean |
isAncestorOf(TagPath typePath,
TagPath potentialSubType)
Recursively goes up the chain of potentialSubType until a path that matches typePath is found.
|
boolean |
isTypePath(TagPath path)
Returns whether the path extends from the complex manager root path.
|
TagPath |
makeNonTypePath(TagPath path) |
TagPath |
makeTypePath(TagPath path)
Makes sure that the given path extends from the root path.
|
java.util.List<QualifiedValue> |
read(java.util.List<TagPath> paths)
Reads the values of the given tag paths.
|
void |
removeTags(java.util.List<TagPath> tagPaths)
Removes the tags at the given tag paths.
|
void |
setPollingDelay(int delay) |
void |
shutdown()
We don't need to actually shut down, because the root tag manager will simply shut down our executor service
|
void |
startup() |
void |
subscribe(java.util.List<TagPath> paths,
java.util.List<TagChangeListener> listeners)
Subscribes to multiple paths at once, in order to be more efficient.
|
void |
subscribe(TagPath path,
TagChangeListener listener)
Subscribes to the given tag path/property.
|
void |
unsubscribe(java.util.List<TagPath> paths,
java.util.List<TagChangeListener> listeners)
Unsubscribes from multiple paths at once, in order to be more efficient.
|
void |
unsubscribe(TagPath path,
TagChangeListener listener)
Unsubscribes from the given tag path/property.
|
WriteOperation |
write(TagPath tagPath,
java.lang.Object value)
Executes a tag write.
|
public DatasourceTagManager(java.util.concurrent.ScheduledExecutorService executor, int delay, StatMetric pollingMetric, StatMetric loadMetric, StatMetric valueChangeMetric)
public void setPollingDelay(int delay)
public void subscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
TagSubscriptionManager
subscribe
in interface TagSubscriptionManager
public void unsubscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
TagSubscriptionManager
unsubscribe
in interface TagSubscriptionManager
public void subscribe(TagPath path, TagChangeListener listener)
TagSubscriptionManager
subscribe
in interface TagSubscriptionManager
public void unsubscribe(TagPath path, TagChangeListener listener)
TagSubscriptionManager
unsubscribe
in interface TagSubscriptionManager
public void addTags(TagPath parentFolder, java.util.List<TagNode> tags, TagManagerBase.CollisionPolicy policy) throws java.lang.Exception
TagManagerBase
addTags
in interface TagManagerBase
java.lang.Exception
public void removeTags(java.util.List<TagPath> tagPaths) throws java.lang.Exception
TagManagerBase
removeTags
in interface TagManagerBase
java.lang.Exception
public void editTags(java.util.List<TagPath> paths, TagDiff edit) throws java.lang.Exception
TagManagerBase
editTags
in interface TagManagerBase
java.lang.Exception
public WriteOperation write(TagPath tagPath, java.lang.Object value)
write
in interface ClientSubManager
tagPath
- The path to the property to editvalue
- The new value to writepublic java.util.List<QualifiedValue> read(java.util.List<TagPath> paths)
TagSubscriptionManager
read
in interface TagSubscriptionManager
public Tag getTag(TagPath aPath)
TagCollection
getTag
in interface TagCollection
public java.util.List<Tag> getTags(java.util.List<TagPath> paths)
getTags
in interface ClientSubManager
public TagDiagnostics getTagDiagnostics(TagPath path)
TagManagerBase
getTagDiagnostics
in interface TagManagerBase
public java.util.List<Tag> browse(TagPath path)
browse
in interface TagCollection
public void shutdown()
shutdown
in interface ClientSubManager
public void startup()
startup
in interface ClientSubManager
public int getDependantCount(TagPath typePath)
getDependantCount
in interface ComplexTypeManager
public java.util.List<Tag> browseDataTypes(TagPath root)
ComplexTypeManager
browseDataTypes
in interface ComplexTypeManager
public ComplexTag getTypeDefinition(TagPath typePath)
getTypeDefinition
in interface TypeManager
public boolean isTypePath(TagPath path)
public TagPath makeTypePath(TagPath path)
public boolean isAncestorOf(TagPath typePath, TagPath potentialSubType)
isAncestorOf
in interface ComplexTypeManager