Package com.sun.jini.landlord
Interface Landlord
- All Superinterfaces:
Remote
- All Known Subinterfaces:
TxnManager
- All Known Implementing Classes:
TransientMahaloImpl,TxnManagerImpl
Interface that granters of leases must implement in order to work with the
LandlordLease implementation of the Lease interface.- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classSimple class that holds return values of theLandlord.renewAllmethod. -
Method Summary
-
Method Details
-
renew
long renew(Uuid cookie, long duration) throws LeaseDeniedException, UnknownLeaseException, RemoteException Called by the lease when itsrenewmethod is called. Renews the lease that is associated with the givencookie.- Parameters:
cookie- theUuidassociated with the lease who'srenewmethod was calledduration- argument passed to therenewcall- 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 specifiedcookieRemoteException- if a communications failure occurs
-
cancel
Called by the lease when itscancelmethod is called. Cancels the lease that is associated with the givencookie.- Parameters:
cookie- theUuidassociated with the lease who'srenewmethod was called- Throws:
UnknownLeaseException- if landlord does not know about a lease with the specifiedcookieRemoteException- if a communications failure occurs
-
renewAll
Called by the lease map when itsrenewAllmethod is called. Should renew the lease that is associated with each element ofcookies- Parameters:
cookies- an array ofUuids, each universally and uniquely identifying a lease granted by thisLandlorddurations- an array of longs, each representing an a duration in milliseconds that the client wants the lease associated with theUuidfrom the corresponding element ofcookiesrenewed for- Returns:
- A RenewResults object that contains the new duration of each lease that was successfully renewed or the exception encountered for each lease that could not be renewed
- Throws:
RemoteException- if a communications failure occurs
-
cancelAll
Called by the lease map when itscancelAllmethod is called. Should cancel the lease that is associated with each element ofcookies- Parameters:
cookies- an array ofUuids, each universally and uniquely identifying a lease granted by thisLandlord- Returns:
- If all the leases specified in the
cookiescould be cancelled returnnull. Otherwise, return aMapthat for each failed cancel attempt maps the corresponding cookie object to an exception describing the failure. - Throws:
RemoteException- if a communications failure occurs
-