GigaSpaces XAP 9.1 API

net.jini.lease
Interface LeaseListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
DesiredExpirationListener

public interface LeaseListener
extends EventListener

The interface that receivers of 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:

It is the responsibility of the entity to register with the 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.

Author:
Sun Microsystems, Inc.
See Also:
Lease, LeaseRenewalManager, LeaseRenewalEvent

Method Summary
 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.
 

Method Detail

notify

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.

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.

Parameters:
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 lease

GigaSpaces XAP 9.1 API

Copyright © GigaSpaces.