Package java.util.concurrent

Examples of java.util.concurrent.ExecutionException


      }

      if (exception == null) {
        return null;
      } else {
        throw new ExecutionException(exception);
      }
    }
  }
View Full Code Here


      if (isCompleted) {
        if (exception == null) {
          return null;
        } else {
          throw new ExecutionException(exception);
        }
      } else {
        throw new TimeoutException();
      }
    }
View Full Code Here

    T value = null;
    do {
      try {
        value = untilNotNull.call();
      } catch (Exception e) {
        throw new ExecutionException(e);
      }

      if (value != null) {
        return value;
      }
View Full Code Here

          }
          return ret;
        } catch (Exception e) {
          throw e;
        } catch (Throwable e) {
          throw new ExecutionException("Error executing memoized function", e);
        }
      }
    });

    if (v == CACHED_NULL) {
View Full Code Here

      T value;
      try {
        value = task.get();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        throw new ExecutionException(e);
      }
      results.add(value);
    }

    return results;
View Full Code Here

          }
          done = true;
        }

        if (this.exception != null) {
          throw new ExecutionException(exception);
        }

        return value;
      }
View Full Code Here

   
    public DubBundleDescription submitAndGet(ITaskAgent processAgent) throws ExecutionException {
      try {
        return processAgent.submit(this).get();
      } catch (InterruptedException e) {
        throw new ExecutionException(e);
      }
    }
View Full Code Here

      }

      @Override
      public Void get() throws InterruptedException, ExecutionException
      {
        throw new ExecutionException(new UnsupportedClassVersionError());
      }

      @Override
      public Void get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
      {
View Full Code Here

      try {
        value = loader.load(key);
      } catch (RuntimeException e) {
        throw new UncheckedExecutionException(e);
      } catch (Exception e) {
        throw new ExecutionException(e);
      } catch (Error e) {
        throw new ExecutionError(e);
      }

      if (value == null) {
View Full Code Here

    }

    public void testSingleNestedWithThread()
    {
        ExecutionException e = getSingleNested();
        String name = this.getClass().getName();
        Throwable focus = findInnermostWithClass( e, name );
        assertEquals( e, focus );
        List<StackTraceElement> stackTraceElements = focusInsideClass( focus.getStackTrace(), name );
        assertEquals( stackTraceElements.get( stackTraceElements.size() - 1 ).getClassName(), name );
View Full Code Here

TOP

Related Classes of java.util.concurrent.ExecutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.