Package net.jini.lease

Examples of net.jini.lease.LeaseRenewalSet.renewFor()


      leaseProvider.createNewLease(owner, rstUtil.durToExp(grant3));

  // start managing the leases for as long as we can
  logger.log(Level.FINE, "Adding managed leases to lease renewal set.");
  set.renewFor(testLease1, Lease.FOREVER);
  set.renewFor(testLease2, Lease.FOREVER);
  set.renewFor(testLease3, Lease.FOREVER);
 
  // allow the lease of the renewal set to expire
  logger.log(Level.FINE, "Getting the renewal set lease.");
  Lease setLease = prepareLease(set.getRenewalSetLease());
View Full Code Here


  // start managing the leases for as long as we can
  logger.log(Level.FINE, "Adding managed leases to lease renewal set.");
  set.renewFor(testLease1, Lease.FOREVER);
  set.renewFor(testLease2, Lease.FOREVER);
  set.renewFor(testLease3, Lease.FOREVER);
 
  // allow the lease of the renewal set to expire
  logger.log(Level.FINE, "Getting the renewal set lease.");
  Lease setLease = prepareLease(set.getRenewalSetLease());
  boolean success = expireRenewalSetLease(setLease);
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) {
View Full Code Here

      leaseProvider.createNewLease(failingOwner,
           rstUtil.durToExp(renewGrant));
 
  // add all the leases to the set
  logger.log(Level.FINE, "Adding client leases to renewal set.");
  set.renewFor(lease01, Long.MAX_VALUE);
  set.renewFor(lease02, Long.MAX_VALUE);
  set.renewFor(lease03, Long.MAX_VALUE);

  // wait for the failures to roll in ...
  rstUtil.waitForRemoteEvents(failingListener, 3, renewGrant * 2);
 
View Full Code Here

           rstUtil.durToExp(renewGrant));
 
  // add all the leases to the set
  logger.log(Level.FINE, "Adding client leases to renewal set.");
  set.renewFor(lease01, Long.MAX_VALUE);
  set.renewFor(lease02, Long.MAX_VALUE);
  set.renewFor(lease03, Long.MAX_VALUE);

  // wait for the failures to roll in ...
  rstUtil.waitForRemoteEvents(failingListener, 3, renewGrant * 2);

 
View Full Code Here

 
  // add all the leases to the set
  logger.log(Level.FINE, "Adding client leases to renewal set.");
  set.renewFor(lease01, Long.MAX_VALUE);
  set.renewFor(lease02, Long.MAX_VALUE);
  set.renewFor(lease03, Long.MAX_VALUE);

  // wait for the failures to roll in ...
  rstUtil.waitForRemoteEvents(failingListener, 3, renewGrant * 2);

  // assert that the three events have arrived
View Full Code Here

        renewGrant + " milliseconds.");
  TestLease lease =
      leaseProvider.createNewLease(failingOwner,
           rstUtil.durToExp(renewGrant));
  logger.log(Level.FINE, "Adding lease to renewal set.");
  set.renewFor(lease, Long.MAX_VALUE);
 
  // wait for the failing lease to renew
  rstUtil.waitForRemoteEvents(rrl, 1, renewGrant*2);

  // Capture the event and ensure there is only one
View Full Code Here

      unreadableLeaseProvider.createNewLease(leaseOwner,
               Lease.FOREVER);
  // start managing the unreadable leases forever
  logger.log(Level.FINE, "Adding unreadable lease with membership of " +
        "Lease.FOREVER");
  set.renewFor(specialLease01, Lease.FOREVER);

  logger.log(Level.FINE, "Adding unreadable lease with membership of " +
        "Lease.FOREVER");
  set.renewFor(specialLease02, Lease.FOREVER);
View Full Code Here

        "Lease.FOREVER");
  set.renewFor(specialLease01, Lease.FOREVER);

  logger.log(Level.FINE, "Adding unreadable lease with membership of " +
        "Lease.FOREVER");
  set.renewFor(specialLease02, Lease.FOREVER);

  /* Assert that a LeaseUnmarshalException is thrown when getLeases()
     is called */
  try {
      UnreadableTestLease.setFailMode(true);
View Full Code Here

      logger.log(Level.FINE, "Creating lease with duration of " +
            renewGrant + " milliseconds.");
      lease[i] =
    shortLeaseProvider.createNewLease(owner,
               rstUtil.durToExp(renewGrant));
      set.renewFor(lease[i], Lease.FOREVER);
      logger.log(Level.FINE, "Creating lease with duration of " +
            renewGrant*3 + " milliseconds.");
      lease[i+1] =
    longLeaseProvider.createNewLease(owner,
             rstUtil.durToExp(renewGrant*3));
 
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.