Class ReteMemory


  • public class ReteMemory
    extends java.lang.Object
    The rete memory for all nodes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map memory
      The memory.
      protected IOAVState state
      The state.
    • Constructor Summary

      Constructors 
      Constructor Description
      ReteMemory​(IOAVState state)
      Create a new rete memory.
    • Field Detail

      • memory

        protected java.util.Map memory
        The memory.
      • state

        protected IOAVState state
        The state.
    • Constructor Detail

      • ReteMemory

        public ReteMemory​(IOAVState state)
        Create a new rete memory.
    • Method Detail

      • hasNodeMemory

        public boolean hasNodeMemory​(INode node)
        Test if there is a memory for a node.
        Parameters:
        node - The node.
        Returns:
        True, if there is a memory.
      • getNodeMemory

        public java.lang.Object getNodeMemory​(INode node)
        Get the memory for a node.
        Parameters:
        node - The node.
        Returns:
        The memory.
      • getTuple

        public Tuple getTuple​(IOAVState state,
                              Tuple left,
                              java.lang.Object right)
        Get a tuple. Returns an existing tuple from the cache, if present. Otherwise a new one is created.
      • getTotalMemorySize

        public int getTotalMemorySize()
        Get the total memory size
        Returns:
        The memory size.
      • toString

        public java.lang.String toString()
        Get the string representation.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string representation.