Package com.sun.jini.landlord
Interface LocalLandlord
- All Known Implementing Classes:
TransientMahaloImpl,TxnManagerImpl
public interface LocalLandlord
Interface that defines the basic landlord primitives (renew and cancel) as local methods. Classes
already implementing
Landlord should be able to implement this interface simply by
adding it the the implements clause of their class declaration. Some users may want to implement this interface using an adaptor class. This could be useful in situations where the landlord's cancel and renew methods don't do quite the right thing for batch lease operations
This interface gives local landlord utilities access to the cancel and renew methods.
- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
- See Also:
-
Method Summary
-
Method Details
-
renew
Renew the lease that is associated with the given cookie.- Parameters:
cookie- an object that universally and uniquely identifies a lease granted by thisLocalLandlordduration- 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 leaseUnknownLeaseException- if landlord does not know about a lease with the specifiedcookie
-
cancel
Cancel the lease that is associated with the given cookie.- Parameters:
cookie- an object that universally and uniquely identifies a lease granted by thisLocalLandlord- Throws:
UnknownLeaseException- if landlord does not know about a lease with the specifiedcookie
-