LM.2. The LeaseRenewalManager

The LeaseRenewalManager class (belonging to the package net.jini.lease) encapsulates functionality that provides for the systematic renewal and overall management of a set of leases associated with one or more remote entities on behalf of a local entity.

The concept of leased resources is fundamental to the Jini technology programming model. Providing a leasing mechanism helps to prevent the accumulation of outdated and unwanted resources in time-based distributed systems, such as the Jini technology infrastructure. The leasing model for Jini network technology (Jini technology), defined in The Jini Technology Core Platform Specification,Leasing and Distributed Systems”, requires renewed proof of interest to continue the existence of a leased resource. Thus, any Jini technology-enabled client (Jini client) or Jini technology-enabled service (Jini service) that requests the use of the leased resources provided by another Jini service may be granted access to those resources for a negotiated period of time, and must continue to request renewal of the lease on each resource for as long as the client or service wishes to have access to the resource.

For example, the Jini lookup service leases two resources: residency in its database and registration with its event notification mechanism. Thus, if a service that is registered with a Jini lookup service wishes to continue its residency beyond the length of the current lease, the service must request a lease renewal from that lookup service. This renewal process must be repeated for as long as the service wishes to maintain its residency in the lookup service. Similarly, if a client has requested that a lookup service notify it of events of interest, then prior to the expiration of the lease on the event registration, the client must request that the lookup service continue to send such events. As with residency in the lookup service, these renewal requests must be repeated for as long as the client wishes to receive event notifications.

Another example of a Jini service providing leased resources would be a service that implements The Jini Technology Core Platform Specification, “Transaction” to manage transactions on behalf of registered participants. That specification requires that a transaction must be a leased resource. Therefore, any entity that creates such a transaction object is required to negotiate (with an entity referred to as a transaction manager) a lease on that object, repeatedly requesting lease renewals prior to the lease’s expiration, for as long as the transaction is to remain in effect.

The LeaseRenewalManager class is designed to be a simple mechanism that provides for the systematic renewal and overall management of leases granted on resources that are provided by Jini services and for which a Jini client or service has registered interest. The LeaseRenewalManager is a utility class, not a remote service. In order to use this utility, an entity must create, in its own address space, an instance of the LeaseRenewalManager to manage the entity’s leases locally.

LM.2.1. Other Types

The types defined in the specification of the LeaseRenewalManager utility class are in the net.jini.lease package. The following types may be referenced in this specification. Whenever referenced, these types will be referenced in unqualified form:

net.jini.core.lease.Lease 
net.jini.core.lease.UnknownLeaseException 
net.jini.core.lease.LeaseDeniedException 
java.rmi.RemoteException 
java.rmi.NoSuchObjectException 
java.util.EventObject 
java.util.EventListener 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.44.182