|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAuthorityPolicy
IAuthorityPolicy defines the policy interface for an actor
acting in the authority role.
| Method Summary | |
|---|---|
void |
assign(long cycle)
Assigns leases to incoming tickets. |
void |
available(ResourceSet resources)
Informs the policy that concrete resources previously marked as unavailable are now available. |
boolean |
bind(AuthorityReservation reservation)
Handles a requests to allocate resources for a ticketed reservation. |
void |
correctDeficit(AuthorityReservation reservation)
|
ResourceSet |
correctFailed(ResourceSet rset)
Incorporates fixed, but previously failed, resources back to the policy |
void |
donate(ResourceSet resources)
Accepts concrete resources to be used for allocation of client requests. |
void |
eject(ResourceSet resources)
Ejects concrete resources from the inventory. |
boolean |
extend(AuthorityReservation reservation)
Handles a requests to extend the allocation of previously allocated resources. |
void |
freed(ResourceSet resources)
Informs the policy that a set of resources can be considered as free. |
void |
release(ResourceSet resources)
Releases concrete resources that are no longer in use. |
int |
unavailable(ResourceSet resources)
Informs the policy that concrete resources are about to become unavailable. |
| Methods inherited from interface orca.shirako.api.IServerPolicy |
|---|
allocate, bind, donate, extend |
| Methods inherited from interface orca.shirako.api.IPolicy |
|---|
close, closed, extend, finish, getClosing, getGuid, prepare, query, remove, reset, revisit, setActor, setLogger |
| Methods inherited from interface orca.shirako.api.IInitialize |
|---|
initialize |
| Methods inherited from interface orca.shirako.api.ISerialize |
|---|
reset, save, save |
| Methods inherited from interface orca.shirako.api.IRecover |
|---|
revisit |
| Method Detail |
|---|
void donate(ResourceSet resources)
throws java.lang.Exception
resources - resource set representing resources to be used for
allocation
java.lang.Exception
void eject(ResourceSet resources)
throws java.lang.Exception
resources -
java.lang.Exception
int unavailable(ResourceSet resources)
throws java.lang.Exception
resources -
java.lang.Exception
void available(ResourceSet resources)
throws java.lang.Exception
resources -
java.lang.Exception
boolean bind(AuthorityReservation reservation)
throws java.lang.Exception
reservation.getRequestedResources(). The requested lease
term can be obtained by calling
reservation.getRequestedTerm(). Properties specific to
the lease protocol can be obtained by calling
reservation.getRequestedResources().getConfigurationProperties().
This method is invoked with the kernel lock on.
If the policy completed processing this request, the functions should
return true. If no further intervention is required, e.g., approval by an
administrator, the policy should also clear the bidPending
flag.
The policy may decide to defer the request for a later time. In this case
the function should return false and the bidPending flag
should remain unchanged.
This method may be invoked multiple times for a given reservation, i.e., if the policy delays the allocation, the system will continue invoking this method at later times until the policy completes processing this request.
reservation - reservation to allocate resources for.
java.lang.Exception
boolean extend(AuthorityReservation reservation)
throws java.lang.Exception
reservation.getRequestedResources(). The requested lease
term can be obtained by calling
reservation.getRequestedTerm(). Properties specific to
the lease protocol can be obtained by calling
reservation.getRequestedResources().getConfigurationProperties().
This method is invoked with the kernel lock on.
If the policy completed processing this request, the functions should
return true. If no further intervention is required, e.g., approval by an
administrator, the policy should also clear the bidPending
flag.
The policy may decide to defer the request for a later time. In this case
the function should return false and the bidPending flag
should remain unchanged.
This method may be invoked multiple times for a given reservation, i.e., if the policy delays the allocation, the system will continue invoking this method at later times until the policy completes processing this request.
reservation - reservation to allocate resources for.
java.lang.Exception
void assign(long cycle)
throws java.lang.Exception
cycle - the cycle the authority is making assignment for
java.lang.Exception
void release(ResourceSet resources)
throws java.lang.Exception
freed(ResourceSet), which is
used to free resources unconditionally.
resources - the resource set to be released
java.lang.Exception#closed(ResourceReservation)}
void freed(ResourceSet resources)
throws java.lang.Exception
resources -
java.lang.Exception
void correctDeficit(AuthorityReservation reservation)
throws java.lang.Exception
java.lang.Exception
ResourceSet correctFailed(ResourceSet rset)
throws java.lang.Exception
rset - the resources
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||