Package java.util.concurrent

Examples of java.util.concurrent.TimeoutException


    try
    {
      if (_result == null)
        _resultReceived.await(timeout, unit);
      if (_result == null)
        throw new TimeoutException();
      if (_result.getFault() != null)
        throw new ExecutionException(_result.getFault());
      else
        return _result.getValue();
    }
View Full Code Here


  {
    _lock.lock();
    _timeout = null;
    try
    {
      this.set(new HessianRPCReplyMessage(null, new TimeoutException(),null));
    }
    finally
    {
      _lock.unlock();
    }
View Full Code Here

        {
          returnMap.put("exception", "timeOut");
          returnMap.put("error", errorWatcher.error);
          returnMap.put("exitValue", -1);
       
          throw new TimeoutException();
        }
      }
      catch(InterruptedException ex)
      {       
          worker.interrupt();
View Full Code Here

      else if (_isDone)
        return _value;
      else if (_isCancelled)
        throw new CancellationException();
      else
        throw new TimeoutException();
    }
View Full Code Here

      else if (_isDone || count != _alarmCount)
        return _value;
      else if (_isCancelled)
        throw new CancellationException();
      else
        throw new TimeoutException();
    }
View Full Code Here

        {
          LOG.debug("Waiting for reads to be possible since writer is In. Reader Range is :" + readerRange.toString(parser)
            + ". Writer Range is :" + writerRange.toString(parser));
        }
        if (timeout)
          throw new TimeoutException();

        if (!readsPossible.await(MAX_LOCK_WAIT_MS, TimeUnit.MILLISECONDS))
          timeout = true;
        if ( debug )
        {
View Full Code Here

          }
          if (timeout)
          {
            LOG.error("timed out waiting for a write lock for [" + parser.toString(start) +
                      "," + parser.toString(end) + "); this: " + this );
            throw new TimeoutException();
          }

          for (LockToken token: readerRanges)
          {
            LOG.info(token.toString(parser));
View Full Code Here

    }

    if (!_shutdownRequest)
    {
      LOG.error("timeout waiting for a shutdown request");
      throw new TimeoutException("timeout waiting for shutdown request");
    }

    _controlLock.lock();
    try
    {
      long waitTime;
      while (!_shutdown && (waitTime = endTs - System.currentTimeMillis()) > 0)
      {
        LOG.info("Waiting for shutdown complete for serving container: " + _containerStaticConfig.getId());
        if (!_shutdownFinishedCondition.await(waitTime, TimeUnit.MILLISECONDS)) break;
      }
    }
    finally
    {
      _controlLock.unlock();
    }

    if (!_shutdown)
    {
      LOG.error("timeout waiting for shutdown");
      throw new TimeoutException("timeout waiting for shutdown to complete");
    }
  }
View Full Code Here

        }

        executor.shutdown();
        if (!executor.awaitTermination(10,
            TimeUnit.MINUTES)) {
                throw new TimeoutException();
        }
        final long endTime = System.currentTimeMillis();
        int count = 0;
        for (int i = 0; i < taskList.size(); ++i) {
            try {
View Full Code Here

                StringBuilder sb = new StringBuilder("");
                for ( Message message : responses_ )
                {
                    sb.append(message.getFrom());                   
                }               
                throw new TimeoutException("Operation timed out - received only " +  responses_.size() + " responses from " + sb.toString() + " .");
            }
        }
        finally
        {
            lock_.unlock();
View Full Code Here

TOP

Related Classes of java.util.concurrent.TimeoutException

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.