public interface LeaseListener extends EventListener
LeaseRenewalEventinstances must implement.
With respect to an entity that uses the
LeaseRenewalManager to manage leases granted to the
entity, this interface defines the mechanism through which an entity
receives notification that the
failed to renew one of the leases the
LeaseRenewalManager is managing for the entity. Such
renewal failures typically occur because of one of the following
conditions is met:
LeaseRenewalManagerdetermines, prior to the next renewal attempt, that the actual expiration time of the lease has passed, implying that any further attempt to renew the lease would be fruitless.
LeaseRenewalManagerdetermines that lease's actual expiration time has passed.
LeaseExceptionoccurs during a lease renewal attempt (collectively referred to as definite exceptions).
LeaseRenewalManager. The object that implements this interface should define the actions to take upon receipt of such notifications. Then, when one of the above conditions occurs, the
LeaseRenewalManagerwill send an instance of the
LeaseRenewalEventclass to that listener object. Note that, prior to sending the event, the
LeaseRenewalManagerwill remove the affected lease from its managed set of leases.
|Modifier and Type||Method and Description|
Called by the
void notify(LeaseRenewalEvent e)
LeaseRenewalManagerwhen it cannot renew a lease that it is managing, and the lease's desired expiration time has not yet been reached.
Note that, prior to invoking this method, the
LeaseRenewalManager removes the affected lease from
the managed set of leases. Note also that, because of the
reentrancy guarantee made by the
LeaseRenewalManager, new leases can be safely added
by this method.
e- instance of
LeaseRenewalEventcontaining information about the lease that the
LeaseRenewalManagerwas unable to renew, as well as information about the condition that made the
LeaseRenewalManagerfail to renew the lease
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.