public interface LeaseListener extends EventListener
LeaseRenewalEvent
instances 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 LeaseRenewalManager
has
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:
LeaseRenewalManager
determines, 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.
LeaseRenewalManager
determines that lease's actual expiration time has passed.
LeaseException
occurs 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
LeaseRenewalManager
will send an instance of the
LeaseRenewalEvent
class to that listener object. Note
that, prior to sending the event, the
LeaseRenewalManager
will remove the affected lease from
its managed set of leases.Lease
,
LeaseRenewalManager
,
LeaseRenewalEvent
Modifier and Type | Method and Description |
---|---|
void |
notify(LeaseRenewalEvent e)
Called by the
LeaseRenewalManager when it cannot
renew a lease that it is managing, and the lease's desired
expiration time has not yet been reached. |
void notify(LeaseRenewalEvent e)
LeaseRenewalManager
when 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 LeaseRenewalEvent
containing
information about the lease that the
LeaseRenewalManager
was unable to renew, as
well as information about the condition that made the
LeaseRenewalManager
fail to renew the leaseCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.