| 
GigaSpaces XAP 9.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LeasePeriodPolicy
Interface for objects that define what policy to use when calculating lease grants and renewals.
| Nested Class Summary | |
|---|---|
static class | 
LeasePeriodPolicy.Result
Simple class that holds a pair of times, the new expiration and duration for a lease.  | 
| Method Summary | |
|---|---|
 LeasePeriodPolicy.Result | 
grant(LeasedResource resource,
      long requestedDuration)
Calculate the initial expiration and duration for a new lease.  | 
 LeasePeriodPolicy.Result | 
renew(LeasedResource resource,
      long requestedDuration)
Calculate the expiration and duration for an existing lease that is being renewed.  | 
| Method Detail | 
|---|
LeasePeriodPolicy.Result grant(LeasedResource resource,
                               long requestedDuration)
                               throws LeaseDeniedException
resource - the server side representation of the new lease that
        needs an initial expiration and durationrequestedDuration - the initial duration the 
        requester of the resources would like. May be
        Lease.ANY
Result that holds
         both the expiration and duration.
LeaseDeniedException - if the grant request 
         is denied.
IllegalArgumentException - if the 
         requested duration is not Lease.ANY 
         and is negative.
LeasePeriodPolicy.Result renew(LeasedResource resource,
                               long requestedDuration)
                               throws LeaseDeniedException
resource - the server side representation of the lease that is
                 being renewedrequestedDuration - the duration the client is requesting. May be
        Lease.ANY.
Result that holds
         both the expiration and duration.
LeaseDeniedException - if the renewal request 
         is denied.
IllegalArgumentException - if the 
         requested duration is not Lease.ANY 
         and is negative.
  | 
GigaSpaces XAP 9.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||