Class TinkerWorkerMemory

  • All Implemented Interfaces:
    Memory, Memory.Admin

    public final class TinkerWorkerMemory
    extends Object
    implements Memory.Admin
    Marko A. Rodriguez (
    • Constructor Detail

      • TinkerWorkerMemory

        public TinkerWorkerMemory​(TinkerMemory mainMemory)
    • Method Detail

      • keys

        public Set<String> keys()
        Description copied from interface: Memory
        The set of keys currently associated with this memory.
        Specified by:
        keys in interface Memory
        the memory's key set.
      • getIteration

        public int getIteration()
        Description copied from interface: Memory
        Get the current iteration number.
        Specified by:
        getIteration in interface Memory
        the current iteration
      • getRuntime

        public long getRuntime()
        Description copied from interface: Memory
        Get the amount of milliseconds the GraphComputer has been executing thus far.
        Specified by:
        getRuntime in interface Memory
        the total time in milliseconds
      • isInitialIteration

        public boolean isInitialIteration()
        Description copied from interface: Memory
        A helper method that states whether the current iteration is 0.
        Specified by:
        isInitialIteration in interface Memory
        whether this is the first iteration
      • get

        public <R> R get​(String key)
                  throws IllegalArgumentException
        Description copied from interface: Memory
        Get the value associated with the provided key.
        Specified by:
        get in interface Memory
        Type Parameters:
        R - the type of the value
        key - the key of the value
        the value
        IllegalArgumentException - is thrown if the key does not exist
      • add

        public void add​(String key,
                        Object value)
        Description copied from interface: Memory
        Set the value of the provided key. This is typically called in setup() and/or terminate() of the VertexProgram. If this is called during execute(), there is no guarantee as to the ultimately stored value as call order is indeterminate. It is up to the implementation to determine the states in which this method can be called.
        Specified by:
        add in interface Memory
        key - they key to set a value for
        value - the value to set for the key
      • complete

        protected void complete()