|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.NodeMap
com.prosysopc.ua.client.NodeCache
public class NodeCache
A client side cache of UaNode objects retrieved from the server.
AddressSpace.getCache()| Nested Class Summary | |
|---|---|
class |
NodeCache.NodeCacheWrapper
A wrapper which keeps track of time when a node was added to the cache. |
| Field Summary | |
|---|---|
protected boolean |
dataTypesInitialized
|
| Fields inherited from class com.prosysopc.ua.NodeMap |
|---|
defaultLocale, nodeFactory |
| Constructor Summary | |
|---|---|
NodeCache(UaNodeFactory nodeFactory,
int maxQueueLength,
long nodeMaxAgeInMillis)
|
|
| Method Summary | |
|---|---|
UaNode |
addNode(UaNode node)
|
protected UaNode |
addNode(UaNode node,
org.opcfoundation.ua.builtintypes.DateTime timestamp)
|
UaNode |
addPermanently(UaNode node)
Add a node permanently to the cache. |
void |
clear()
Clear the node map of all entries. |
protected UaNode |
createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
Create a new node and add it to the cache. |
int |
getMaxQueueLength()
The maximum number of nodes to keep in the cache queue. |
UaNode |
getNode(org.opcfoundation.ua.builtintypes.NodeId nodeId)
|
long |
getNodeMaxAgeInMillis()
Maximum age of a node in the cache. |
boolean |
hasNode(org.opcfoundation.ua.builtintypes.NodeId nodeId)
Check if the map contains a node with the specified NodeId. |
void |
initDataTypes()
Initialize built-in types into the NodeMap. |
protected boolean |
isPermanentTimestamp(org.opcfoundation.ua.builtintypes.DateTime timestamp)
|
UaNode |
remove(org.opcfoundation.ua.builtintypes.NodeId nodeId)
Remove a node from the node map. |
UaNode |
remove(UaNode node)
Remove a node from the node map. |
void |
setMaxQueueLength(int maxQueueLength)
Set the maximum queue length. |
void |
setNodeMaxAgeInMillis(long nodeMaxAgeInMillis)
Set the maximum time to keep nodes in the cache. |
int |
size()
|
| Methods inherited from class com.prosysopc.ua.NodeMap |
|---|
addType, addType, getNodeFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected volatile boolean dataTypesInitialized
| Constructor Detail |
|---|
public NodeCache(UaNodeFactory nodeFactory,
int maxQueueLength,
long nodeMaxAgeInMillis)
| Method Detail |
|---|
public UaNode addNode(UaNode node)
addNode in class NodeMappublic UaNode addPermanently(UaNode node)
node - the node to add
public void clear()
NodeMap
clear in class NodeMappublic int getMaxQueueLength()
public UaNode getNode(org.opcfoundation.ua.builtintypes.NodeId nodeId)
getNode in class NodeMappublic long getNodeMaxAgeInMillis()
public boolean hasNode(org.opcfoundation.ua.builtintypes.NodeId nodeId)
NodeMap
hasNode in class NodeMapnodeId - the ID to check
public void initDataTypes()
throws UaNodeFactoryException
clear() is called calling this method again has no effect.
UaNodeFactoryExceptionpublic UaNode remove(org.opcfoundation.ua.builtintypes.NodeId nodeId)
NodeMap
remove in class NodeMapnodeId - the node to remove.
public UaNode remove(UaNode node)
NodeMap
remove in class NodeMapnode - the node to remove.
public void setMaxQueueLength(int maxQueueLength)
maxQueueLength - the max lengthgetMaxQueueLength()public void setNodeMaxAgeInMillis(long nodeMaxAgeInMillis)
nodeMaxAgeInMillis - max time in millisecondsgetNodeMaxAgeInMillis()public int size()
protected UaNode addNode(UaNode node,
org.opcfoundation.ua.builtintypes.DateTime timestamp)
protected UaNode createNode(org.opcfoundation.ua.core.NodeClass nodeClass,
org.opcfoundation.ua.builtintypes.NodeId nodeId,
org.opcfoundation.ua.builtintypes.QualifiedName browseName,
org.opcfoundation.ua.builtintypes.LocalizedText displayName,
org.opcfoundation.ua.builtintypes.ExpandedNodeId typeDefinition)
throws UaNodeFactoryException
nodeClass - nodeId - browseName - displayName - typeDefinition -
UaNodeFactoryExceptionprotected boolean isPermanentTimestamp(org.opcfoundation.ua.builtintypes.DateTime timestamp)
timestamp -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||