Documentation of 'net.finmath.concurrency.FutureWrapper' Java class
FutureWrapper
net.finmath.concurrency

Class FutureWrapper<V>

  • Type Parameters:
    V - The result type returned by this Future's get method.
    All Implemented Interfaces:
    java.util.concurrent.Future<V>


    public class FutureWrapper<V>
    extends java.lang.Object
    implements java.util.concurrent.Future<V>
    Implementation of the Future interface, without any concurrent execution. This wrapper comes handy, if we want to represent the result of a direct (blocking) valuation as a future to replace concurrent valuation.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FutureWrapper(V object)
      Create a wrapper to an object that looks like a Future on that object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean cancel(boolean mayInterruptIfRunning) 
      V get() 
      V get(long arg0, java.util.concurrent.TimeUnit arg1) 
      boolean isCancelled() 
      boolean isDone() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FutureWrapper

        public FutureWrapper(V object)
        Create a wrapper to an object that looks like a Future on that object.
        Parameters:
        object - Object to wrap.
    • Method Detail

      • cancel

        public boolean cancel(boolean mayInterruptIfRunning)
        Specified by:
        cancel in interface java.util.concurrent.Future<V>
      • get

        public V get()
              throws java.lang.InterruptedException,
                     java.util.concurrent.ExecutionException
        Specified by:
        get in interface java.util.concurrent.Future<V>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • get

        public V get(long arg0,
                     java.util.concurrent.TimeUnit arg1)
              throws java.lang.InterruptedException,
                     java.util.concurrent.ExecutionException,
                     java.util.concurrent.TimeoutException
        Specified by:
        get in interface java.util.concurrent.Future<V>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.util.concurrent.TimeoutException
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface java.util.concurrent.Future<V>
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface java.util.concurrent.Future<V>

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.