org.zodiac.sdk.simplenetty.concurrent.Promise Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zodiac-sdk-nio Show documentation
Show all versions of zodiac-sdk-nio Show documentation
Zodiac SDK NIO2(New Non-Blocking IO)
package org.zodiac.sdk.simplenetty.concurrent;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.zodiac.sdk.simplenetty.listener.Listener;
public interface Promise extends Future {
boolean setUnCancellable();
Promise success(V result);
boolean trySuccess(V result);
Promise setFail(Throwable throwable);
boolean tryFail(Throwable throwable);
@Override
Promise addListener(Listener listener, int op);
@Override
Promise addListeners(Map, Integer> listeners);
@Override
Promise removeListener(Listener listener);
@Override
Promise removeListeners(List> listeners);
@Override
Promise sync() throws InterruptedException;
@Override
Promise syncUninterruptibly();
@Override
Promise await() throws InterruptedException;
@Override
Promise awaitUninterruptibly();
@Override
boolean await(long timeout, TimeUnit timeUnit) throws InterruptedException;
@Override
boolean awaitUninterruptibly(long timeout, TimeUnit timeUnit);
}