Class ValueWithSubValues<T>

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

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

      • ValueWithSubValues

        public ValueWithSubValues​(T data,
                                  boolean force,
                                  java.util.Collection<Value<?>> subValues)
    • 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
      • 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
      • 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
      • 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.

      • isForce

        public boolean isForce()
        Description copied from interface: Value
        Checks if this value is marked as "force". Force values typically bypass normal processing constraints and must be handled immediately regardless of system state.
        Specified by:
        isForce in interface Value<T>
        Returns:
        true if this is a force 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)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public void toString​(io.aether.utils.AString sb)
        Specified by:
        toString in interface io.aether.utils.ToString