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

com.taobao.drc.clusterclient.util.Futures Maven / Gradle / Ivy

There is a newer version: 5.0.0.1.beta
Show newest version
package com.taobao.drc.clusterclient.util;

import java.util.concurrent.Future;

/**
 * @author yangyang
 * @since 2017/8/7
 */
public class Futures {
    public static  Future success(T t) {
        SettableFuture promise = new SettableFuture();
        promise.success(t);
        return promise;
    }

    public static  Future failure(Throwable throwable) {
        SettableFuture promise = new SettableFuture();
        promise.failure(throwable);
        return promise;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy