Package net.jini.core.lease

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


  checkLease(mrl, DURATION);

  shutdown(0);
 
  logger.log(Level.INFO, "Cancelling registration lease");
  mrl.cancel();
    }

    /**
     * Invoke parent's setup and parser
     * @exception TestException will usually indicate an "unresolved"
View Full Code Here


  logger.log(Level.INFO, "Sleeping past expiration");
  Thread.sleep(DURATION);

  logger.log(Level.INFO, "Attempting to cancel lease");
  try {
      lease.cancel();
      throw new TestException( "Successfully cancelled an expired lease");
  } catch (UnknownLeaseException ule) {
      logger.log(Level.INFO,
           "Expected UnknownLeaseException thrown by cancel()");
  }
View Full Code Here

        mrl.renew(DURATION);
  checkLease(mrl, DURATION);

  logger.log(Level.INFO, "Cancelling registration lease");
  mrl.cancel();
    }

    /**
     * Invoke parent's setup and parser
     * @exception TestException will usually indicate an "unresolved"
View Full Code Here

            Thread.yield();
        }

        // Force a cancel
        logger.log(Level.INFO, "Canceling registration lease");
        lease.cancel();

        // Write the canary
        logger.log(Level.INFO, "Writing entry to read back from log");
        writeEntry(null, dataEntry);
View Full Code Here

  logger.log(Level.INFO,
       "Awoken @: " + new Date(System.currentTimeMillis()));

  logger.log(Level.INFO, "Attempting to cancel lease");
  try {
      lease.cancel();
      throw new TestException("Successfully cancelled an expired lease");
  } catch (UnknownLeaseException ule) {
      logger.log(Level.INFO,
           "Caught expected exception upon cancellation");
  }
View Full Code Here

                                     srvcReg);
        srvcLease = (Lease) getConfig().prepare
                                    ("test.reggieServiceRegistrationPreparer",
                                     srvcReg.getLease());
        long defDur = srvcLease.getExpiration() - System.currentTimeMillis();
        srvcLease.cancel();
        /* lease durations to test */
        leaseDur[0] = rfeDur;
        leaseDur[1] = defDur;
        /* test service ids */
        for(int i=0;i<srvcID.length;i++) {
View Full Code Here

  checkLease(mrl, DURATION);

  shutdown(0);

        logger.log(Level.INFO, "Cancelling registration lease");
        mrl.cancel();
    }

    /**
     * Invoke parent's setup and parser
     * @exception TestException will usually indicate an "unresolved"
View Full Code Here

  mr.disableDelivery();
  assertCount(myRel, 0);
  logger.log(Level.INFO, "Disabled delivery");

  mrl.cancel();
  assertCount(myRel, 0);
  logger.log(Level.INFO, "Cancelled Registration's lease");
    }

    /**
 
View Full Code Here

  assertCount(myRel, 0);
  logger.log(Level.INFO, "Disabled delivery");
 
  mrl1.cancel();
  assertCount(myRel, 0);
  mrl2.cancel();
  assertCount(myRel, 0);
  logger.log(Level.INFO, "Cancelled Registration's lease");
    }

    /**
 
View Full Code Here

                    break;
                } else {
                    logger.warn("Invalid Lease time [{}] returned from ProvisionManager, retry count [{}]",
                                leaseTime, i);
                    try {
                        lease.cancel();
                    } catch(Exception e ) {
                        logger.trace("Cancelling Lease with invalid lease time", e);
                    }
                    try {
                        Thread.sleep(provisionerRetryDelay);
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.