com.sun.jini.mercury
Class MailboxImpl.LocalLandlordAdaptor

java.lang.Object
  extended by com.sun.jini.mercury.MailboxImpl.LocalLandlordAdaptor
All Implemented Interfaces:
LocalLandlord
Enclosing class:
MailboxImpl

private class MailboxImpl.LocalLandlordAdaptor
extends Object
implements LocalLandlord

Adaptor class implementation of LocalLandlord. We use this adaptor class with LandlordUtil because we want to only acquire the concurrentObj.writeLock() once per batch lease operation.


Constructor Summary
private MailboxImpl.LocalLandlordAdaptor()
           
 
Method Summary
 void cancel(Uuid cookie)
          Cancel the lease that is associated with the given cookie.
 long renew(Uuid cookie, long extension)
          Renew the lease that is associated with the given cookie.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailboxImpl.LocalLandlordAdaptor

private MailboxImpl.LocalLandlordAdaptor()
Method Detail

renew

public long renew(Uuid cookie,
                  long extension)
           throws LeaseDeniedException,
                  UnknownLeaseException
Description copied from interface: LocalLandlord
Renew the lease that is associated with the given cookie.

Specified by:
renew in interface LocalLandlord
Parameters:
cookie - an object that universally and uniquely identifies a lease granted by this LocalLandlord
extension - the duration in milliseconds the client wants the lease renewed for
Returns:
The new duration the lease should have
Throws:
LeaseDeniedException - if the landlord is unwilling to renew the lease
UnknownLeaseException - if landlord does not know about a lease with the specified cookie

cancel

public void cancel(Uuid cookie)
            throws UnknownLeaseException
Description copied from interface: LocalLandlord
Cancel the lease that is associated with the given cookie.

Specified by:
cancel in interface LocalLandlord
Parameters:
cookie - an object that universally and uniquely identifies a lease granted by this LocalLandlord
Throws:
UnknownLeaseException - if landlord does not know about a lease with the specified cookie


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.