Package net.jini.core.lease

Examples of net.jini.core.lease.UnknownLeaseException


      throw new IllegalArgumentException("negative lease duration");
  EventReg reg = (EventReg)eventByID.get(new Long(eventID));
  if (reg == null ||
      !reg.leaseID.equals(leaseID) ||
      reg.leaseExpiration <= now)
      throw new UnknownLeaseException();
  if (renewDuration > maxEventLease &&
      renewDuration > reg.leaseExpiration - now)
      renewDuration = Math.max(reg.leaseExpiration - now, maxEventLease);
  long renewExpiration = now + renewDuration;
  /* force a re-sort: must remove before changing, then reinsert */
 
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

       // create an owner for the lease that will renewal successfully
       succeedingOwner = new OpCountingOwner(renewGrant);
      
       // create an owner for the lease that will throw a definite exception
       String testName = "AssocRenewalFailSetTest";
       Exception except = new UnknownLeaseException(testName);
       failingOwner = new FailingOpCountingOwner(except, 0, renewGrant*2);

       // logs events as they arrive
       rrl = new RememberingRemoteListener(getExporter());

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.