Package io.aether.utils.streams
Class ValueExclusiveOnReject<T>
- java.lang.Object
-
- io.aether.utils.streams.ValueProxy<T>
-
- io.aether.utils.streams.ValueExclusiveOnReject<T>
-
- All Implemented Interfaces:
Value<T>,io.aether.utils.ToString
public class ValueExclusiveOnReject<T> extends ValueProxy<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceValueExclusiveOnReject.Listener
-
Field Summary
-
Fields inherited from class io.aether.utils.streams.ValueProxy
self
-
Fields inherited from interface io.aether.utils.streams.Value
BLOCK_COUNTER, CLOSE_INSTANCE, FORCE_INSTANCE, TIMEOUT
-
-
Constructor Summary
Constructors Constructor Description ValueExclusiveOnReject(Value<T> self, ValueExclusiveOnReject.Listener task)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidreject(java.lang.Object owner, long blockId)Rejects the value sending process due to a stream being blocked.java.lang.StringtoString()-
Methods inherited from class io.aether.utils.streams.ValueProxy
data, enter, getRequestDataId, isClose, isData, isForce, isRequestData, priority, success, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.aether.utils.streams.Value
addRequest, isOnlyRequestData, linkFuture, linkOnRejectExclusive, map, map2, notClose, onEnter, onReject, onSuccess, reject, timeout, timeout, withClose, withForce
-
-
-
-
Constructor Detail
-
ValueExclusiveOnReject
public ValueExclusiveOnReject(Value<T> self, ValueExclusiveOnReject.Listener task)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classValueProxy<T>
-
reject
public void reject(java.lang.Object owner, long blockId)Description copied from interface:ValueRejects the value sending process due to a stream being blocked.- Specified by:
rejectin interfaceValue<T>- Overrides:
rejectin classValueProxy<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.
-
-