Class ValueTask<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 ValueTask<T>
    extends Object
    implements Task<T>, com.tangosol.io.pof.PortableObject
    A Task that provides a constant value as a result.
    Since:
    21.12
    Author:
    bo
    See Also:
    Serialized Form
    • Field Detail

      • m_value

        protected T m_value
        The value for the Task.
    • Constructor Detail

      • ValueTask

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

        public ValueTask​(T value)
        Constructs a ValueTask.
        Parameters:
        value - the value
    • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object