Package io.aether.utils.streams
Class ValueMap<T2,T>
- java.lang.Object
-
- io.aether.utils.streams.ValueMap<T2,T>
-
-
Field Summary
-
Fields inherited from interface io.aether.utils.streams.Value
BLOCK_COUNTER, CLOSE_INSTANCE, FORCE_INSTANCE, TIMEOUT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T2data()Retrieves the data payload contained in this value.voidenter(java.lang.Object owner)Marks the beginning of value processing by a handler.booleanisClose()Checks if this value signals stream/processing closure.booleanisData()Checks if this value contains processable data.booleanisForce()Checks if this value is marked as "force".booleanisRequestData()Determines if this value represents a data request.intpriority()Returns the processing priority of this value.voidreject(java.lang.Object owner, long blockId)Rejects the value sending process due to a stream being blocked.voidsuccess(java.lang.Object owner)Releases resources associated with this value when it's no longer needed.java.lang.StringtoString()voidtoString(io.aether.utils.AString sb)-
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, getRequestDataId, isOnlyRequestData, linkFuture, linkOnRejectExclusive, map, map2, notClose, onEnter, onReject, onSuccess, reject, timeout, timeout, withClose, withForce
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toString
public void toString(io.aether.utils.AString sb)
- Specified by:
toStringin interfaceio.aether.utils.ToString
-
enter
public void enter(java.lang.Object owner)
Description copied from interface:ValueMarks the beginning of value processing by a handler. Called when a processor starts working with this value.
-
isData
public boolean isData()
Description copied from interface:ValueChecks if this value contains processable data. Returns false for control values (force, request, close).
-
isRequestData
public boolean isRequestData()
Description copied from interface:ValueDetermines if this value represents a data request. Request values typically ask for data to be generated/sent rather than containing data themselves.- Specified by:
isRequestDatain interfaceValue<T2>- Returns:
- true if this is a request value, false otherwise
-
data
public T2 data()
Description copied from interface:ValueRetrieves the data payload contained in this value. The actual data type is determined by the generic parameter 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<T2>- 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.
-
priority
public int priority()
Description copied from interface:ValueReturns the processing priority of this value. Higher priority values should be processed before lower priority ones. Default implementation returns 0 (normal priority).
-
isClose
public boolean isClose()
Description copied from interface:ValueChecks if this value signals stream/processing closure. Close values typically indicate the end of a data stream or processing sequence.
-
isForce
public boolean isForce()
Description copied from interface:ValueChecks if this value is marked as "force". Force values typically bypass normal processing constraints and must be handled immediately regardless of system state.
-
success
public void success(java.lang.Object owner)
Description copied from interface:ValueReleases resources associated with this value when it's no longer needed. This is the normal end-of-life operation for a value.
-
-