ENTERPRISE JAVAHow to Use Jini Distributed Leasing

ENTERPRISE JAVA
How to Use Jini Distributed Leasing

Kathy Kozel

Listing 1. The Jini Lease interface.


package net.jini.core.lease;
import java.rmi.RemoteException;
  public interface Lease {
   ... 
    void cancel() throws UnknownLeaseException, RemoteException;
    void renew(long duration)
         throws LeaseDeniedException, UnknownLeaseException, 
         RemoteException;
    void setSerialFormat(int format);
    int getSerialFormat();
    LeaseMap createLeaseMap(long duration);
    boolean canBatch(Lease lease);
}