Package net.jini.core.lease

Examples of net.jini.core.lease.UnknownLeaseException


    protected synchronized void renewWork(long duration)
  throws RemoteException, LeaseDeniedException, UnknownLeaseException
    {

  if (untilFailure == 0) {
      throw new UnknownLeaseException();
  } else {
      untilFailure--;
      super.renewWork(duration);
  }
    }
View Full Code Here


  // Has the lease expired?
  if (expiration < now) {
      if ((now - slop) > desiredExpiration)
    setRsltIfNeeded("Renwal service let lease expire");
      throw new UnknownLeaseException("Lease expired");
  }

  // No, is the LRS renewing to the correct desired expiration?
  final long requestedExp = now + extension;
View Full Code Here

      // Registration doesn't exist or has expired
      if(leaseLogger.isLoggable(Level.FINEST)) {
                leaseLogger.log(Level.FINEST,
        "Lease for {0} was NOT renewed", cookie);
      }
      throw new UnknownLeaseException("Not managing requested lease");
  }

  if(leaseLogger.isLoggable(Level.FINEST)) {
            leaseLogger.log(Level.FINEST,
          "Lease for {0} was renewed", cookie);
View Full Code Here

                expirationLogger.log(Level.FINEST, "Iterator notified");
            }
           
  } catch (ThrowThis tt) {
      // Registration doesn't exist or has expired
      throw new UnknownLeaseException("Not managing requested lease");
  }
      if(leaseLogger.isLoggable(Level.FINEST)) {
            leaseLogger.log(Level.FINEST,
          "Lease cancelled for: {0}", cookie);
      }
View Full Code Here

  long now = System.currentTimeMillis();
  SvcReg reg = (SvcReg)serviceByID.get(serviceID);
  if (reg == null ||
      !reg.leaseID.equals(leaseID) ||
      reg.leaseExpiration <= now)
      throw new UnknownLeaseException();
  Item pre = (Item)reg.item.clone();
  EntryRep[] sets = reg.item.attributeSets;
  int i = 0;
  /* don't add if it's a duplicate */
  for (int j = 0; j < attrSets.length; j++) {
View Full Code Here

  long now = System.currentTimeMillis();
  SvcReg reg = (SvcReg)serviceByID.get(serviceID);
  if (reg == null ||
      !reg.leaseID.equals(leaseID) ||
      reg.leaseExpiration <= now)
      throw new UnknownLeaseException();
  Item pre = (Item)reg.item.clone();
  EntryRep[] preSets = pre.attributeSets;
  EntryRep[] sets = reg.item.attributeSets;
  for (int i = preSets.length; --i >= 0; ) {
      EntryRep preSet = preSets[i];
View Full Code Here

  long now = System.currentTimeMillis();
  SvcReg reg = (SvcReg)serviceByID.get(serviceID);
  if (reg == null ||
      !reg.leaseID.equals(leaseID) ||
      reg.leaseExpiration <= now)
      throw new UnknownLeaseException();
  Item pre = (Item)reg.item.clone();
  EntryRep[] entries = reg.item.attributeSets;
  for (int i = entries.length; --i >= 0; ) {
      deleteAttrs(reg, entries[i], false);
  }
View Full Code Here

  long now = System.currentTimeMillis();
  SvcReg reg = (SvcReg)serviceByID.get(serviceID);
  if (reg == null ||
      !reg.leaseID.equals(leaseID) ||
      reg.leaseExpiration <= now)
      throw new UnknownLeaseException();
  deleteService(reg, now);
  /* wake up thread if this might be the (only) earliest time */
  if (reg.leaseExpiration == minSvcExpiration)
      concurrentObj.waiterNotify(serviceNotifier);
    }
View Full Code Here

      throw new IllegalArgumentException("negative lease duration");
  SvcReg reg = (SvcReg)serviceByID.get(serviceID);
  if (reg == null ||
      !reg.leaseID.equals(leaseID) ||
      reg.leaseExpiration <= now)
      throw new UnknownLeaseException();
  if (renewDuration > maxServiceLease &&
      renewDuration > reg.leaseExpiration - now)
      renewDuration = Math.max(reg.leaseExpiration - now,
             maxServiceLease);
  long renewExpiration = now + renewDuration;
View Full Code Here

  throws UnknownLeaseException
    {
  long now = System.currentTimeMillis();
  EventReg reg = (EventReg)eventByID.get(new Long(eventID));
  if (reg == null || reg.leaseExpiration <= now)
      throw new UnknownLeaseException();
  deleteEvent(reg);
  /* wake up thread if this might be the (only) earliest time */
  if (reg.leaseExpiration == minEventExpiration)
      concurrentObj.waiterNotify(eventNotifier);
    }
View Full Code Here

TOP

Related Classes of net.jini.core.lease.UnknownLeaseException

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.