Package mondrian.util

Class CompletedFuture<V>

  • All Implemented Interfaces:
    Future<V>

    public class CompletedFuture<V>
    extends Object
    implements Future<V>
    Implementation of Future that has already completed.
    • Constructor Detail

      • CompletedFuture

        public CompletedFuture​(V value,
                               ExecutionException exception)
        Creates a CompletedFuture.

        If throwable is not null, the computation is deemed to have failed. The exception will be thrown (wrapped in a ExecutionException) when get() or get(long, java.util.concurrent.TimeUnit) are invoked.

        If exception is null, the computation is deemed to have succeeded. In this case, a null value in value just means that the computation yielded a null result.

        Parameters:
        value - Value (may be null)
        exception - Exception that occurred while computing result