public interface Landlord extends Remote
LandlordLease
implementation of the
Lease
interface.Lease
,
LandlordLease
Modifier and Type | Interface and Description |
---|---|
static class |
Landlord.RenewResults
Simple class that holds return values of
the
Landlord.renewAll method. |
Modifier and Type | Method and Description |
---|---|
void |
cancel(Uuid cookie)
Called by the lease when its
cancel method is
called. |
Map |
cancelAll(Uuid[] cookies)
Called by the lease map when its
cancelAll method is called. |
long |
renew(Uuid cookie,
long duration)
Called by the lease when its
renew method is called. |
Landlord.RenewResults |
renewAll(Uuid[] cookies,
long[] durations)
Called by the lease map when its
renewAll method is called. |
long renew(Uuid cookie, long duration) throws LeaseDeniedException, UnknownLeaseException, RemoteException
renew
method is called.
Renews the lease that is associated with the given cookie
.cookie
- the Uuid
associated with the lease who's
renew
method was calledduration
- argument passed to the renew
callLeaseDeniedException
- if the landlord is unwilling to
renew the leaseUnknownLeaseException
- if landlord does not know about
a lease with the specified cookie
RemoteException
- if a communications failure occursvoid cancel(Uuid cookie) throws UnknownLeaseException, RemoteException
cancel
method is
called. Cancels the lease that is associated with the given
cookie
.cookie
- the Uuid
associated with the lease who's
renew
method was calledUnknownLeaseException
- if landlord does not know about
a lease with the specified cookie
RemoteException
- if a communications failure occursLandlord.RenewResults renewAll(Uuid[] cookies, long[] durations) throws RemoteException
renewAll
method is called. Should renew the lease that is
associated with each element of cookies
cookies
- an array of Uuid
s, each universally and
uniquely identifying a lease granted by this
Landlord
durations
- an array of longs, each representing an a
duration in milliseconds that the client
wants the lease associated with the Uuid
from the corresponding element of
cookies
renewed forRemoteException
- if a communications failure occursMap cancelAll(Uuid[] cookies) throws RemoteException
cancelAll
method is called. Should cancel the lease that is
associated with each element of cookies
cookies
- an array of Uuid
s, each universally and
uniquely identifying a lease granted by this
Landlord
cookies
could be cancelled return null
. Otherwise,
return a Map
that for each failed cancel
attempt maps the corresponding cookie object to an
exception describing the failure.RemoteException
- if a communications failure occursCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.