Class ValueOfRequest<T>

  • All Implemented Interfaces:
    Value<T>, io.aether.utils.ToString

    public class ValueOfRequest<T>
    extends java.lang.Object
    implements Value<T>
    • Constructor Detail

      • ValueOfRequest

        public ValueOfRequest​(long id)
    • Method Detail

      • data

        public T data()
        Description copied from interface: Value
        Retrieves the data payload contained in this value. The actual data type is determined by the generic parameter T.
        Specified by:
        data in interface Value<T>
        Returns:
        The contained data object, which may be null for special values
      • isRequestData

        public boolean isRequestData()
        Description copied from interface: Value
        Determines if this value represents a data request. Request values typically ask for data to be generated/sent rather than containing data themselves.
        Specified by:
        isRequestData in interface Value<T>
        Returns:
        true if this is a request value, false otherwise
      • success

        public void success​(java.lang.Object owner)
        Description copied from interface: Value
        Releases resources associated with this value when it's no longer needed. This is the normal end-of-life operation for a value.
        Specified by:
        success in interface Value<T>
        Parameters:
        owner - The object initiating the success operation (for tracking/logging)
      • enter

        public void enter​(java.lang.Object owner)
        Description copied from interface: Value
        Marks the beginning of value processing by a handler. Called when a processor starts working with this value.
        Specified by:
        enter in interface Value<T>
        Parameters:
        owner - The object that begins processing this value
      • reject

        public void reject​(java.lang.Object owner,
                           long blockId)
        Description copied from interface: Value
        Rejects the value sending process due to a stream being blocked.
        Specified by:
        reject in interface Value<T>
        Parameters:
        owner - An object that provides information about the current state of the block.

        When the creator of the Value object receives an reject call, it understands that the stream is currently blocked and data cannot be sent at this moment.

        If, at the same time, a Value object with the isRequestData flag arrives from the stream, a race condition can occur. To resolve this issue, the checkWritable method should be called to determine the actual state of the remote node.

      • isData

        public boolean isData()
        Description copied from interface: Value
        Checks if this value contains processable data. Returns false for control values (force, request, close).
        Specified by:
        isData in interface Value<T>
        Returns:
        true if this value contains data, false otherwise