public static interface DemandAware.Sink
DemandAware.Sink that accepts data. It can signal its DemandAware.Source demand/readiness to emit more data.
Instances of implementing classes are required to be thread-safe as they are shared amongst multiple threads.| Modifier and Type | Method and Description |
|---|---|
boolean |
hasDemand()
|
void |
removeSource()
Removes the
DemandAware.Source reference from this DemandAware.Sink. |
void |
setSource(DemandAware.Source source)
Sets the
DemandAware.Source for a DemandAware.Sink. |
boolean hasDemand()
true if the DemandAware.Sink has demand or false if the source has no demand. false means
either the DemandAware.Sink has no demand in general because data is not needed or the current demand is saturated.true if the DemandAware.Sink demands data.void setSource(DemandAware.Source source)
DemandAware.Source for a DemandAware.Sink. The DemandAware.Sink is notified by this DemandAware.Source if the source
indicates new demand or the sink catches up so it's ready to receive more data.source - the reference to the data DemandAware.Source, must not be null.void removeSource()
DemandAware.Source reference from this DemandAware.Sink. Any previously set DemandAware.Source will no longer be
asked for data.Copyright © 2021 lettuce.io. All rights reserved.