Class RunnableWithResultTask<T>

  • Type Parameters:
    T - the type of result produced by the Task
    All Implemented Interfaces:
    Task<T>, com.tangosol.io.ExternalizableLite, com.tangosol.io.pof.PortableObject, Serializable

    public class RunnableWithResultTask<T>
    extends Object
    implements Task<T>, com.tangosol.io.pof.PortableObject
    A Task that calls a runnable.
    Since:
    21.12
    Author:
    bo, lh
    See Also:
    Serialized Form
    • Field Detail

      • m_runnable

        protected Runnable m_runnable
        The runnable for the Task.
      • m_result

        protected T m_result
        The runnable for the Task.
    • Constructor Detail

      • RunnableWithResultTask

        public RunnableWithResultTask()
        Constructs a RunnableWithResultTask (required for serialization).
      • RunnableWithResultTask

        public RunnableWithResultTask​(Runnable runnable,
                                      T result)
        Parameters:
        runnable - the runnable
        result - the result to return
    • Method Detail

      • readExternal

        public void readExternal​(DataInput in)
                          throws IOException
        Specified by:
        readExternal in interface com.tangosol.io.ExternalizableLite
        Throws:
        IOException
      • writeExternal

        public void writeExternal​(DataOutput out)
                           throws IOException
        Specified by:
        writeExternal in interface com.tangosol.io.ExternalizableLite
        Throws:
        IOException
      • readExternal

        public void readExternal​(com.tangosol.io.pof.PofReader in)
                          throws IOException
        Specified by:
        readExternal in interface com.tangosol.io.pof.PortableObject
        Throws:
        IOException
      • writeExternal

        public void writeExternal​(com.tangosol.io.pof.PofWriter out)
                           throws IOException
        Specified by:
        writeExternal in interface com.tangosol.io.pof.PortableObject
        Throws:
        IOException