comparison src/org/dancres/blitz/lease/LeaseHandler.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.lease;
2
3 import java.io.IOException;
4
5 import net.jini.core.lease.UnknownLeaseException;
6 import net.jini.core.lease.LeaseDeniedException;
7
8 /**
9 Each LeaseHandler instance knows how to renew/cancel a leased resource
10 identified by a particular type of SpaceUID.
11
12 @see org.dancres.blitz.lease.LeaseHandlers
13 */
14 public interface LeaseHandler {
15 public boolean recognizes(SpaceUID aUID);
16
17 /**
18 @return the duration actually assigned to the resource associated with
19 the SpaceUID after bounding etc.
20 */
21 public long renew(SpaceUID aUID, long aLeaseDuration)
22 throws UnknownLeaseException, LeaseDeniedException, IOException;
23
24 public void cancel(SpaceUID aUID)
25 throws UnknownLeaseException, IOException;
26 }