Examples of renewFor()


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

      leaseProvider.createNewLease(leaseOwner, Lease.FOREVER);

  // start managing the normal leases forever
  logger.log(Level.FINE, "Adding normal lease #1 with membership of " +
        "Lease.FOREVER");
  set.renewFor(testLease01, Lease.FOREVER);

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

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

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

  logger.log(Level.FINE, "Adding normal lease #2 with membership of " +
        "Lease.FOREVER");
  set.renewFor(testLease02, Lease.FOREVER);

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

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

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

  logger.log(Level.FINE, "Adding normal lease #3 with membership of " +
        "Lease.FOREVER");
  set.renewFor(testLease03, Lease.FOREVER);

  // create 2 unreadable test leases to be managed
  logger.log(Level.FINE, "Creating an unreadable lease #1 to be" +
        " managed.");
  logger.log(Level.FINE, "Duration == Lease.FOREVER");
View Full Code Here

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

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

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

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

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

  logger.log(Level.FINE, "Adding unreadable lease #2 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

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

  // start managing the lease for only half of its grant time
  logger.log(Level.FINE, "Adding managed lease to lease renewal set.");
  long membership = renewGrant / 2;
  logger.log(Level.FINE, "Membership duration == " + membership);
  set.renewFor(testLease, membership);
 
  // sleep for 3/4 of the renewGrant time
  long sleeptime = renewGrant * 3 / 4;
  logger.log(Level.FINE, "Waiting " + sleeptime + " milliseconds for " +
        "membership duration to expire.");
View Full Code Here

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

 
  // add the lease to the renewal set w/ membership of renewGrant
  logger.log(Level.FINE, "Adding lease to renewal set.");
  long membership = renewGrant;
  logger.log(Level.FINE, "membership = " + membership + " milliseconds.");
  set.renewFor(lease, membership);

  // wait for the failure to roll in ...
  rstUtil.waitForRemoteEvents(normalListener, 1, renewGrant * 2);

  // capture the event
View Full Code Here

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

  logger.log(Level.FINE, "Creating lease #1 with duration of " +
        renewGrant + " milliseconds.");
  TestLease lease01 =
      leaseProvider.createNewLease(failingOwner,
           rstUtil.durToExp(renewGrant));
  set.renewFor(lease01, Long.MAX_VALUE);

  logger.log(Level.FINE, "Creating lease #2 with duration of " +
        renewGrant + " milliseconds.");
  TestLease lease02 =
      leaseProvider.createNewLease(failingOwner,
View Full Code Here

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

  logger.log(Level.FINE, "Creating lease #2 with duration of " +
        renewGrant + " milliseconds.");
  TestLease lease02 =
      leaseProvider.createNewLease(failingOwner,
           rstUtil.durToExp(renewGrant));
  set.renewFor(lease02, Long.MAX_VALUE);

  logger.log(Level.FINE, "Creating lease #3 with duration of " +
        renewGrant + " milliseconds.");
  TestLease lease03 =
      leaseProvider.createNewLease(failingOwner,
View Full Code Here

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

  logger.log(Level.FINE, "Creating lease #3 with duration of " +
        renewGrant + " milliseconds.");
  TestLease lease03 =
      leaseProvider.createNewLease(failingOwner,
           rstUtil.durToExp(renewGrant));
  set.renewFor(lease03, Long.MAX_VALUE);

  // sleep until the leases have expired.
  rstUtil.waitForRemoteEvents(rrl, 3, renewGrant * 2);

  // ensure that we have exactly 3 events
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.