com.hammurapi.common.concurrent

## Class NonBlockingFutureTask<V>

- java.lang.Object
- - java.util.concurrent.FutureTask<V>
  - - com.hammurapi.common.concurrent.NonBlockingFutureTask<V>

- Type Parameters:
    `V` -
  All Implemented Interfaces:
    Runnable, Future<V>, RunnableFuture<V>

      public class NonBlockingFutureTask<V>
      extends FutureTask<V>

  Future task which cannot block in get() indefinitely. If it is not yet started, the task gets executed in the caller thread.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NonBlockingFutureTask(Callable<V> callable)`
    `NonBlockingFutureTask(Runnable runnable, V result)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `V` | `get()`

    - ### Methods inherited from class java.util.concurrent.FutureTask

      `cancel, done, get, isCancelled, isDone, run, runAndReset, set, setException`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NonBlockingFutureTask

          public NonBlockingFutureTask(Callable<V> callable)

    - #### NonBlockingFutureTask

          public NonBlockingFutureTask(Runnable runnable,
                               V result)

  - ### Method Detail

    - #### get

          public V get()
                throws InterruptedException,
                       ExecutionException

      Specified by:
        `get` in interface `Future<V>`
      Overrides:
        `get` in class `FutureTask<V>`
      Throws:
        `InterruptedException`
        `ExecutionException`