Package com.sun.jini.landlord.LeasePeriodPolicy

Examples of com.sun.jini.landlord.LeasePeriodPolicy.Result


        txntr = new TxnManagerTransaction(
      txnMgrProxy, logmgr, tid, taskpool,
      taskWakeupMgr, this, uuid);
  Lease txnmgrlease = null;
  try {
            Result r = txnLeasePeriodPolicy.grant(txntr, lease);
            txntr.setExpiration(r.expiration);
            txnmgrlease =
          leaseFactory.newLease(
        uuid,
              r.expiration);
View Full Code Here


  if (txntr == null)
      throw new UnknownLeaseException();

  // synchronize on the resource so there is not a race condition
  // between renew and expiration
  Result r;
  synchronized (txntr) {
//TODO - check for ACTIVE too?
//TODO - if post-ACTIVE, do anything? 
      if (!ensureCurrent(txntr))
    throw new UnknownLeaseException("Lease already expired");
View Full Code Here

          getEventLogPath(persistenceDirectory, uuid)):
      eventLogFactory.iterator(uuid);
        ServiceRegistration reg = new ServiceRegistration(uuid, iter);
        Lease l = null;
        try {
      Result r =
          leasePolicy.grant(reg, duration);
      reg.setExpiration(r.expiration);
            l = leaseFactory.newLease(uuid, r.expiration);
//TODO - destroy iter if leaseFor throws any exception
  } catch (LeaseDeniedException lde) {
View Full Code Here

    "Attempting to renew {0}''s lease for {1} sec",
    new Object[] {cookie, new Long(extension/1000)});
  }
 
  // Get registration of interest
        Result r;
  try {
            // Note: the following method will throw a ThrowThis exception
            // if the registration is invalid (i.e. expired or non-existent)
      reg = getServiceRegistration(cookie);
      // delegate renewal to policy object
View Full Code Here

          getEventLogPath(persistenceDirectory, uuid)):
      eventLogFactory.iterator(uuid);
        ServiceRegistration reg = new ServiceRegistration(uuid, iter);
        Lease l = null;
        try {
      Result r =
          leasePolicy.grant(reg, duration);
      reg.setExpiration(r.expiration);
            l = leaseFactory.newLease(uuid, r.expiration);
//TODO - destroy iter if leaseFor throws any exception
  } catch (LeaseDeniedException lde) {
View Full Code Here

    "Attempting to renew {0}''s lease for {1} sec",
    new Object[] {cookie, new Long(extension/1000)});
  }
 
  // Get registration of interest
        Result r;
  try {
            // Note: the following method will throw a ThrowThis exception
            // if the registration is invalid (i.e. expired or non-existent)
      reg = getServiceRegistration(cookie);
      // delegate renewal to policy object
View Full Code Here

        txntr = new TxnManagerTransaction(
      txnMgrProxy, logmgr, tid, taskpool,
      taskWakeupMgr, this, uuid);
  Lease txnmgrlease = null;
  try {
            Result r = txnLeasePeriodPolicy.grant(txntr, lease);
            txntr.setExpiration(r.expiration);
            txnmgrlease =
          leaseFactory.newLease(
        uuid,
              r.expiration);
View Full Code Here

  if (txntr == null)
      throw new UnknownLeaseException();

  // synchronize on the resource so there is not a race condition
  // between renew and expiration
  Result r;
  synchronized (txntr) {
//TODO - check for ACTIVE too?
//TODO - if post-ACTIVE, do anything? 
      if (!ensureCurrent(txntr))
    throw new UnknownLeaseException("Lease already expired");
View Full Code Here

          getEventLogPath(persistenceDirectory, uuid)):
      eventLogFactory.iterator(uuid);
        ServiceRegistration reg = new ServiceRegistration(uuid, iter);
        Lease l = null;
        try {
      Result r =
          leasePolicy.grant(reg, duration);
      reg.setExpiration(r.expiration);
            l = leaseFactory.newLease(uuid, r.expiration);
//TODO - destroy iter if leaseFor throws any exception
  } catch (LeaseDeniedException lde) {
View Full Code Here

    "Attempting to renew {0}''s lease for {1} sec",
    new Object[] {cookie, new Long(extension/1000)});
  }
 
  // Get registration of interest
        Result r;
  try {
            // Note: the following method will throw a ThrowThis exception
            // if the registration is invalid (i.e. expired or non-existent)
      reg = getServiceRegistration(cookie);
      // delegate renewal to policy object
View Full Code Here

TOP

Related Classes of com.sun.jini.landlord.LeasePeriodPolicy.Result

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.