public interface LocalLandlord
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.
Landlord
Modifier and Type | Method and Description |
---|---|
void |
cancel(Uuid cookie)
Cancel the lease that is associated with the given cookie.
|
long |
renew(Uuid cookie,
long duration)
Renew the lease that is associated with the given cookie.
|
long renew(Uuid cookie, long duration) throws LeaseDeniedException, UnknownLeaseException
cookie
- an object that universally and uniquely identifies a
lease granted by this LocalLandlord
duration
- the duration in milliseconds the client
wants the lease renewed forLeaseDeniedException
- if the landlord is unwilling to
renew the leaseUnknownLeaseException
- if landlord does not know about
a lease with the specified cookie
void cancel(Uuid cookie) throws UnknownLeaseException
cookie
- an object that universally and uniquely identifies a
lease granted by this LocalLandlord
UnknownLeaseException
- if landlord does not know about
a lease with the specified cookie
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.