Class CollectMemory


  • public class CollectMemory
    extends java.lang.Object
    Memory for the collect node.
    • Field Detail

      • workingmem

        protected java.util.Map workingmem
        The working memory (index tuple -> result tuple).
      • resultmem

        protected java.util.Set resultmem
        The result memory.
    • Constructor Detail

      • CollectMemory

        public CollectMemory()
    • Method Detail

      • addResultTuple

        public boolean addResultTuple​(Tuple tuple)
        Add a tuple to the result.
        Parameters:
        tuple - The result node.
        Returns:
        True, if could be added.
      • removeResultTuple

        public boolean removeResultTuple​(Tuple tuple)
        Remove from the result.
        Parameters:
        tuple - The tuple.
        Returns:
        True, if could be removed.
      • resultMemoryContains

        public boolean resultMemoryContains​(Tuple tuple)
        Test if tuple is contained in result memory.
        Parameters:
        tuple - The tuple.
        Returns:
        True, if contained.
      • getResultMemory

        public java.util.Collection getResultMemory()
        Get the result memory.
        Returns:
        The result memory.
      • putWorkingTuple

        public void putWorkingTuple​(Tuple key,
                                    Tuple result)
        Add a tuple to the result.
        Parameters:
        tuple - The result node.
      • getWorkingTuple

        public Tuple getWorkingTuple​(Tuple key)
        Add a tuple to the result.
        Parameters:
        tuple - The result node.
        Returns:
        True, if could be added.
      • removeWorkingTuple

        public void removeWorkingTuple​(Tuple key)
        Remove from the result.
        Parameters:
        tuple - The tuple.
      • getWorkingMemory

        public java.util.Map getWorkingMemory()
        Get the result memory.
        Returns:
        The result memory.
      • size

        public int size()
        Get the size of the beta memory (including indexed memories).
        Returns:
        The size of the memory.
      • toString

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