1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package com.sun.jini.landlord;
19
20 import net.jini.core.lease.LeaseDeniedException;
21
22
23
24
25
26 @Deprecated
27 public interface LeasePeriodPolicy extends org.apache.river.landlord.LeasePeriodPolicy {
28 public class Result extends org.apache.river.landlord.LeasePeriodPolicy.Result {
29 public Result(long expiration, long duration) {
30 super(expiration, duration);
31 }
32
33 private Result(org.apache.river.landlord.LeasePeriodPolicy.Result result){
34 super(result.expiration, result.duration);
35 }
36 }
37
38
39 public default Result grant(LeasedResource resource, long requestedDuration)
40 throws LeaseDeniedException
41 {
42 return new Result(
43 grant(
44 (org.apache.river.landlord.LeasedResource) resource,
45 requestedDuration
46 )
47 );
48 }
49
50 public default Result renew(LeasedResource resource, long requestedDuration)
51 throws LeaseDeniedException
52 {
53 return new Result(
54 renew(
55 (org.apache.river.landlord.LeasedResource) resource,
56 requestedDuration
57 )
58 );
59 }
60 }