Package net.jini.core.lease

Examples of net.jini.core.lease.Lease.cancel()


    //Delete Job services
    //Delete leases
    try {
      while(!leaseList.isEmpty()) {
        Lease lease = (Lease)leaseList.firstElement();
        lease.cancel();
        leaseList.remove(lease);
        //System.out.println("--RMServer--: deleting lease");
      }
    } catch(Exception ex) {
      //System.out.println("--RMServer--: Exception in shutdown");
View Full Code Here


         tracerTable.remove(e.nextElement())).terminate();
      }
      while(!leaseList.isEmpty()) {
        //System.out.println("--RMAdapter--: deleting lease");
        Lease lease = (Lease)leaseList.firstElement();
        lease.cancel();
        leaseList.remove(lease);
      }
      if(nativeSGERMAdapter != null) {
        nativeSGERMAdapter.sgeGDIShutdown();
        nativeSGERMAdapter = null;
View Full Code Here

  /*
   * Assert that adding set01's lease to set02 succeeds if set01's
   * lease has been cancelled.
   */
  setLease.cancel();
  try {
      set02.renewFor(setLease, renewGrant);
  } catch (IllegalArgumentException ex) {
    throw new TestException("Failed to add an expired set "
          + "lease to another set",
View Full Code Here

        // Give the cancel a chance to happen
        Thread.sleep(10000);

        try {
            lease1.cancel();
            throw new TestException(
                    "Lease on first registion not cancled by"
                    + " Runtime exception");
        } catch (UnknownLeaseException e) {
View Full Code Here

  try {
      Lease managedLease = leaseProvider.createNewLease(owner,
                    renewGrant);
      set.renewFor(managedLease, Lease.FOREVER);
      managedLease.cancel();
      String message = "Performed successful add operation on\n";
      message += " renewal set after its lease had expired.";
      throw new TestException(message);
  } catch (NoSuchObjectException ex) {
      // we passed so just keep on going ...
View Full Code Here

  try {
      Lease managedLease = leaseProvider.createNewLease(owner,
                    renewGrant);
      set.renewFor(managedLease, Lease.FOREVER);
      managedLease.cancel();
      String message = "Performed successful add operation on\n";
      message += " renewal set after its lease had expired.";
      throw new TestException(message);
  } catch (NoSuchObjectException ex) {
      // we passed so just keep on going ...
View Full Code Here

  /*
   * Assert that adding set01's lease to set02 succeeds if set01's
   * lease has been cancelled.
   */
  setLease.cancel();
  try {
      set02.renewFor(setLease, renewGrant);
  } catch (IllegalArgumentException ex) {
    throw new TestException("Failed to add an expired set "
          + "lease to another set",
View Full Code Here

    public void cancelTrackedLeases() {
  Iterator iter = leaseArray.iterator();
  while (iter.hasNext()) {
     Lease lease = (Lease) iter.next();
     try {
         lease.cancel();
     } catch (UnknownLeaseException ignore) {
     } catch (RemoteException ex) {
         logger.log(Level.INFO, "Failed to cancel lease", ex);
     }
  }
View Full Code Here

  logger.log(Level.INFO, "Sleeping for " + DURATION + " (ms)");
  Thread.sleep(DURATION + 1000);

  try {
      logger.log(Level.INFO, "Canceling registration lease");
      mrl.cancel();
      throw new TestException("Successfully renewed an "
          + "expired registration");
  } catch (UnknownLeaseException ule) {
      logger.log(Level.INFO, "Could not renew expired lease - OK");
  }
View Full Code Here

        // Give the cancel a chance to happen
        Thread.sleep(10000);

        try {
            lease1.cancel();
            throw new TestException(
                    "Lease on first registion not cancled by"
                    + " Runtime exception");
        } catch (UnknownLeaseException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.