Class OpcUaConnector.NodeCacheEntry

  • Enclosing class:
    OpcUaConnector<CO,​CI>

    private static class OpcUaConnector.NodeCacheEntry
    extends java.lang.Object
    Realizes a node cache entry with value lifetime.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.milo.opcua.sdk.client.nodes.UaNode node  
      private java.lang.Object value  
      private long valueLifetime  
      private long valueTimestamp  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NodeCacheEntry()
      Creates a cache entry for a pseudo node, e.g., a built-in property.
      private NodeCacheEntry​(org.eclipse.milo.opcua.sdk.client.nodes.UaNode node)
      Creates a cache entry for a given node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.Object getValue()
      Returns the value of this node considering the caching lifetime.
      private void setValue​(java.lang.Object value)
      Sets the cached value.
      private void setValue​(java.lang.Object value, int lifetime)
      Changes the value of a cached entry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • node

        private org.eclipse.milo.opcua.sdk.client.nodes.UaNode node
      • valueLifetime

        private long valueLifetime
      • valueTimestamp

        private long valueTimestamp
      • value

        private java.lang.Object value
    • Constructor Detail

      • NodeCacheEntry

        private NodeCacheEntry()
        Creates a cache entry for a pseudo node, e.g., a built-in property.
      • NodeCacheEntry

        private NodeCacheEntry​(org.eclipse.milo.opcua.sdk.client.nodes.UaNode node)
        Creates a cache entry for a given node.
        Parameters:
        node - the node
    • Method Detail

      • setValue

        private void setValue​(java.lang.Object value)
        Sets the cached value.
        Parameters:
        value - the value to set
      • setValue

        private void setValue​(java.lang.Object value,
                              int lifetime)
        Changes the value of a cached entry.
        Parameters:
        value - the value to set
        lifetime - the lifetime (negative unlimited, 0 request all time, positive caching time in ms)
      • getValue

        private java.lang.Object getValue()
        Returns the value of this node considering the caching lifetime.
        Returns:
        the value of this node