io.netty.util.concurrent.ProgressiveFuture Java Examples
The following examples show how to use
io.netty.util.concurrent.ProgressiveFuture.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RequestContextAwareProgressiveFutureListener.java From armeria with Apache License 2.0 | 5 votes |
@SuppressWarnings("unchecked") static <T extends ProgressiveFuture<?>> GenericProgressiveFutureListener<T> of( RequestContext ctx, GenericProgressiveFutureListener listener) { requireNonNull(ctx, "ctx"); requireNonNull(listener, "listener"); return new RequestContextAwareProgressiveFutureListener(ctx, listener); }
Example #2
Source File: RequestContextAwareProgressiveFutureListener.java From armeria with Apache License 2.0 | 5 votes |
@Override @SuppressWarnings("unchecked") public void operationProgressed(ProgressiveFuture future, long progress, long total) throws Exception { try (SafeCloseable ignored = ctx.push()) { listener.operationProgressed(future, progress, total); } }