All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.sdk.simplenetty.concurrent.Promise Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy