Package com.sun.sgs.app

Examples of com.sun.sgs.app.TransactionTimeoutException


      if (checkStatus(status)) {
    return;
      }
      now = System.currentTimeMillis();
  }
  throw new TransactionTimeoutException(
      "Timeout after " + (now - start) +
      " ms waiting for entry " + this);
    }
View Full Code Here


      if (!state.statusSet.contains(status)) {
    return;
      }
      now = System.currentTimeMillis();
  }
  throw new TransactionTimeoutException(
      "Timeout after " + (now - start) +
      " ms waiting for entry " + this);
    }
View Full Code Here

    throw new TransactionInterruptedException(
        "Interrupt while waiting for lock: " + this, e);
      }
      now = System.currentTimeMillis();
  }
  throw new TransactionTimeoutException(
      "Timeout after " + (now - start) +
      " ms waiting for lock: " + this);
    }
View Full Code Here

          "members:{2}", channelRefId,
          nodeIds, task.getMembers());
        }
        return task.getMembers();
    } else {
        throw new TransactionTimeoutException(
      "transaction timeout: " + txn.getTimeout());
    }

      }
  }
View Full Code Here

     */
    public void prepare(long stop) {
  try {
      long timeout = stop - System.currentTimeMillis();
      if (timeout < 0) {
    throw new TransactionTimeoutException("Transaction timed out");
      } else if (!commitAvailable.tryAcquire(timeout, MILLISECONDS)) {
    throw new ResourceUnavailableException("Update queue full");
      }
  } catch (InterruptedException e) {
      throw new TransactionInterruptedException("Task interrupted", e);
View Full Code Here

        " failed: ";
        String conflictMsg = ", with conflicting node ID " +
      ((NodeInfo) conflict.getConflictingLocker()).nodeId;
        switch (conflict.getType()) {
        case TIMEOUT:
      throw new TransactionTimeoutException(
          accessMsg + "Transaction timed out" + conflictMsg);
        case DENIED:
      throw new TransactionConflictException(
          accessMsg + "Access denied" + conflictMsg);
        case INTERRUPTED:
View Full Code Here

      } else if ((state.get() & PREPARED) != 0) {
    return;
      }
      long runningTime = System.currentTimeMillis() - getCreationTime();
      if (runningTime > getTimeout()) {
    throw new TransactionTimeoutException(
        "Transaction timed out: " + runningTime + " ms");
      }
  }
View Full Code Here

       * If the transaction is not active on the server, then it may have
       * timed out.
       */
      long duration = System.currentTimeMillis() - txn.getCreationTime();
      if (duration > txn.getTimeout()) {
    e = new TransactionTimeoutException(
        operation + " failed: Transaction timed out after " +
        duration + " ms",
        e);
      }
  }
View Full Code Here

     */
    private void checkTimeout(Transaction txn) {
  long max = Math.min(txn.getTimeout(), maxTxnTimeout);
  long runningTime = System.currentTimeMillis() - txn.getCreationTime();
  if (runningTime > max) {
      throw new TransactionTimeoutException(
    "Transaction timed out: " + runningTime + " ms");
  }
    }
View Full Code Here

  default:
      throw new AssertionError();
  }
  long runningTime = System.currentTimeMillis() - getCreationTime();
  if (runningTime > getTimeout()) {
      TransactionTimeoutException exception =
    new TransactionTimeoutException(
        "transaction timed out: " + runningTime + " ms");
      abort(exception);
      throw exception;
  }
    }
View Full Code Here

TOP

Related Classes of com.sun.sgs.app.TransactionTimeoutException

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.