Class ValueExclusiveOnReject<T>

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

    public class ValueExclusiveOnReject<T>
    extends ValueProxy<T>
    • Method Detail

      • 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>
        Overrides:
        reject in class ValueProxy<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.