GigaSpaces XAP 9.7.2 API

com.sun.jini.landlord
Interface LocalLandlord

All Known Implementing Classes:
TxnManagerImpl

public interface LocalLandlord

Interface that defines the basic landlord primitives (renew and cancel) as local methods. Classes already implementing Landlord should be able to implement this interface simply by adding it the the implements clause of their class declaration.

Some users may want to implement this interface using an adaptor class. This could be useful in situations where the landlord's cancel and renew methods don't do quite the right thing for batch lease operations

This interface gives local landlord utilities access to the cancel and renew methods.

Since:
2.0
Author:
Sun Microsystems, Inc.
See Also:
Landlord

Method Summary
 void cancel(Uuid cookie)
          Cancel the lease that is associated with the given cookie.
 long renew(Uuid cookie, long duration)
          Renew the lease that is associated with the given cookie.
 

Method Detail

renew

long renew(Uuid cookie,
           long duration)
           throws LeaseDeniedException,
                  UnknownLeaseException
Renew the lease that is associated with the given cookie.

Parameters:
cookie - an object that universally and uniquely identifies a lease granted by this LocalLandlord
duration - the duration in milliseconds the client wants the lease renewed for
Returns:
The new duration the lease should have
Throws:
LeaseDeniedException - if the landlord is unwilling to renew the lease
UnknownLeaseException - if landlord does not know about a lease with the specified cookie

cancel

void cancel(Uuid cookie)
            throws UnknownLeaseException
Cancel the lease that is associated with the given cookie.

Parameters:
cookie - an object that universally and uniquely identifies a lease granted by this LocalLandlord
Throws:
UnknownLeaseException - if landlord does not know about a lease with the specified cookie

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.