view src/org/dancres/blitz/lease/LeaseHandler.java @ 8:fa7203ea1622

Remove some dead code (Dave Brosius)
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 23 May 2009 11:27:41 +0100
parents 3dc0c5604566
children
line wrap: on
line source

package org.dancres.blitz.lease;

import java.io.IOException;

import net.jini.core.lease.UnknownLeaseException;
import net.jini.core.lease.LeaseDeniedException;

/**
   Each LeaseHandler instance knows how to renew/cancel a leased resource
   identified by a particular type of SpaceUID.

   @see org.dancres.blitz.lease.LeaseHandlers
 */
public interface LeaseHandler {
    public boolean recognizes(SpaceUID aUID);

    /**
       @return the duration actually assigned to the resource associated with
       the SpaceUID after bounding etc.
     */
    public long renew(SpaceUID aUID, long aLeaseDuration)
        throws UnknownLeaseException, LeaseDeniedException, IOException;

    public void cancel(SpaceUID aUID)
        throws UnknownLeaseException, IOException;
}