public class StandardBlock<TIn,TOut> implements IFullyBlock<TIn,TOut>, IBlock
public StandardBlock(@NotNull
java.lang.String name,
int bufferSize,
@NotNull
TargetType targetType,
@NotNull
ExecutionOptions options,
@NotNull
kotlin.jvm.functions.Function2<? super TIn,? super kotlin.coroutines.Continuation<? super TOut>,? extends java.lang.Object> map)
@NotNull public org.mechdancer.dataflow.core.intefaces.IPostable.DefaultSource<TIn> getDefaultSource()
Default source
默认源节点
@NotNull public java.util.Set<org.mechdancer.dataflow.core.intefaces.ITarget> getTargets()
Targets set
宿集合
public long getBufferSize()
public void clear()
@NotNull public Feedback offer(long id, @NotNull IEgress<TIn> egress)
id - event id 源内部事件的唯一标识,供节点查找egress - exit of this event 事件到来的出口@NotNull public java.lang.Object consume(long id)
Consumes a event
If is success, event might be removed from queue in source. Called by target, which notified by source.
消费一个事件
如果成功,事件可能从源的队列中移除 由得到源通知的宿调用
id - id of the event 事件的标识@Nullable
public java.lang.Object receive(@NotNull
kotlin.coroutines.Continuation<? super TOut> p)
Blocking receive
阻塞接收
@NotNull public ILink<TOut> linkTo(@NotNull ITarget<TOut> target, @NotNull LinkOptions<TOut> options)
Links to a specific target
添加到指定宿的链接
@NotNull public java.lang.String getName()
@NotNull public java.util.UUID getUuid()
public int compareTo(@NotNull
IWithUUID other)