common_helper/src/main/java/com/xiongyingqi/util/concurrent/ListenableFutureCallbackRegistry.java
public void failure(Throwable t) {
        synchronized (mutex) {
            state = State.FAILURE;
            this.result = t;

            while (!callbacks.isEmpty()) {
                callbacks.poll().onFailure(t);
            }
        }
    }
public void failure(Throwable t) {
        synchronized (mutex) {
            state = State.FAILURE;
            this.result = t;

            while (!callbacks.isEmpty()) {
                callbacks.poll().onFailure(t);
            }
        }
    }
Triggers a {@link ListenableFutureCallback#onFailure(Throwable)} call on all added
callbacks with the given {@code Throwable}.

@param t the exception to trigger the callbacks with