接口的使用
cn.wjybxx.base.IRegistration
使用IRegistration的程序包
-
cn.wjybxx.base中IRegistration的使用
-
cn.wjybxx.base.concurrent中IRegistration的使用
修饰符和类型方法说明ICancelToken.thenAccept(BiConsumer<? super ICancelToken, Object> action, Object ctx) ICancelToken.thenAccept(BiConsumer<? super ICancelToken, Object> action, Object ctx, int options) 添加的action将在Token收到取消信号时执行 1.如果已收到取消请求,则给定的action会立即执行。ICancelToken.thenAccept(Consumer<? super ICancelToken> action) ICancelToken.thenAccept(Consumer<? super ICancelToken> action, int options) 添加的action将在Token收到取消信号时执行 1.如果已收到取消请求,则给定的action会立即执行。ICancelToken.thenAcceptAsync(Executor executor, BiConsumer<? super ICancelToken, Object> action, Object ctx) ICancelToken.thenAcceptAsync(Executor executor, BiConsumer<? super ICancelToken, Object> action, Object ctx, int options) ICancelToken.thenAcceptAsync(Executor executor, Consumer<? super ICancelToken> action) ICancelToken.thenAcceptAsync(Executor executor, Consumer<? super ICancelToken> action, int options) ICancelToken.thenNotify(ICancelTokenListener action, Object ctx) ICancelToken.thenNotify(ICancelTokenListener action, Object ctx, int options) 添加一个特定类型的监听器 (用于特殊需求时避免额外的闭包 - task经常需要监听取消令牌)ICancelToken.thenNotifyAsync(Executor executor, ICancelTokenListener action, Object ctx) ICancelToken.thenNotifyAsync(Executor executor, ICancelTokenListener action, Object ctx, int options) ICancelToken.thenRunAsync(Executor executor, Runnable action) ICancelToken.thenRunAsync(Executor executor, Runnable action, int options) ICancelToken.thenRunAsync(Executor executor, Consumer<Object> action, Object ctx) ICancelToken.thenRunAsync(Executor executor, Consumer<Object> action, Object ctx, int options) ICancelToken.thenTransferTo(ICancelTokenSource child) ICancelToken.thenTransferTo(ICancelTokenSource child, int options) 该接口用于方便构建子上下文 1.子token会在当前token进入取消状态时被取消 2.该接口本质是一个快捷方法,但允许子类优化ICancelToken.thenTransferToAsync(Executor executor, ICancelTokenSource child) ICancelToken.thenTransferToAsync(Executor executor, ICancelTokenSource child, int options)