Interface SettableFuture<V>

All Superinterfaces:
Future<V>
All Known Subinterfaces:
SettableRunnableFuture<V>
All Known Implementing Classes:
EDTRunnableFuture, SimpleFuture, SimpleRunnableFuture

public interface SettableFuture<V> extends Future<V>
A Future which provides methods for setting its result.
Since:
author Joel Uckelman, 3.2.0
  • Method Details

    • setException

      void setException(Throwable t)
      Sets the exception to be wrapped in an ExecutionException and thrown by Future.get(). May be called only from the thread executing the computation.
      Parameters:
      t - the exception
    • set

      void set(V r)
      Sets the result to be returned by Future.get(). May be called only from the thread executing the computation.
      Parameters:
      r - the result