Java 类com.google.common.util.concurrent.ImmediateFuture.ImmediateFailedFuture 实例源码

项目:guava-mock    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */
public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}
项目:googles-monorepo-demo    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */
public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}
项目:codebuff    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */
public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}
项目:guava    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */
public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}
项目:guava    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */
public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}
项目:codebuff    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */


public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}
项目:codebuff    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */


public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}
项目:codebuff    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */


public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}
项目:codebuff    文件:Futures.java   
/**
 * Returns a {@code ListenableFuture} which has an exception set immediately upon construction.
 *
 * <p>The returned {@code Future} can't be cancelled, and its {@code isDone()} method always
 * returns {@code true}. Calling {@code get()} will immediately throw the provided {@code
 * Throwable} wrapped in an {@code ExecutionException}.
 */


public static <V> ListenableFuture<V> immediateFailedFuture(Throwable throwable) {
  checkNotNull(throwable);
  return new ImmediateFailedFuture<V>(throwable);
}