|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorca.shirako.core.Policy
orca.shirako.core.ServiceManagerPolicy
public class ServiceManagerPolicy
| Field Summary | |
|---|---|
protected ServiceManagerPolicyRecoverer |
recoverer
The recoverer. |
| Fields inherited from class orca.shirako.core.Policy |
|---|
actor, clock, guid, logger, PropertyGuid |
| Constructor Summary | |
|---|---|
ServiceManagerPolicy()
Default constructor. |
|
ServiceManagerPolicy(ServiceManager actor)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
demand(ReservationClient reservation)
Injects a new resource demand into the demand stream. |
Bids |
formulateBids(long cycle)
Formulates bids to the upstream broker(s). |
ReservationSet |
getHoldings()
Return the holdings for the actor. |
ReservationSet |
getHoldings(long cycle)
Returns the holdings for the actor at the given time instance. |
ReservationSet |
getRedeeming(long cycle)
Returns a set of reservations that must be redeemed. |
void |
initialize()
Initializes the object. |
void |
leaseSatisfies(ResourceSet requestedResources,
ResourceSet actualResources,
Term requestedTerm,
Term actualTerm)
Checks if the resources and term received in a lease are in compliance with what was initially requested. |
void |
reset()
Post recovery entry point. |
void |
revisit(IActor actor,
java.util.Properties p)
Recovers state of the component using a previously saved properties list and a references to the actor this component belongs to. |
void |
revisit(ResourceReservation reservation)
Informs the mapper about a reservation. |
void |
ticketSatisfies(ResourceSet requestedResources,
ResourceSet actualResources,
Term requestedTerm,
Term actualTerm)
Checks if the resources and term received in a ticket are in compliance with what was initially requested. |
void |
updateTicketComplete(IReservation reservation)
Notifies the policy that a ticket update operation has completed. |
| Methods inherited from class orca.shirako.core.Policy |
|---|
close, closed, error, extend, finish, getClosing, getGuid, internalError, logError, logWarn, prepare, query, remove, reset, save, save, setActor, setLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface orca.shirako.api.IPolicy |
|---|
close, closed, extend, finish, getClosing, getGuid, prepare, query, remove, setActor, setLogger |
| Methods inherited from interface orca.shirako.api.ISerialize |
|---|
reset, save, save |
| Field Detail |
|---|
protected ServiceManagerPolicyRecoverer recoverer
| Constructor Detail |
|---|
public ServiceManagerPolicy()
public ServiceManagerPolicy(ServiceManager actor)
actor - actor the mapper belongs to| Method Detail |
|---|
public void initialize()
throws java.lang.Exception
IInitialize
initialize in interface IInitializeinitialize in class Policyjava.lang.Exceptionpublic void demand(ReservationClient reservation)
IClientPolicy
demand in interface IClientPolicyreservation - reservation representing resource demandIClientPolicy.formulateBids(long)
public void updateTicketComplete(IReservation reservation)
throws java.lang.Exception
IClientPolicy
updateTicketComplete in interface IClientPolicyreservation - reservation for which an update ticket operation has
completed
java.lang.Exceptionpublic Bids formulateBids(long cycle)
IClientPolicyHere are some guidelines for implementing this method:
formulateBids in interface IClientPolicycycle - The current time
public ReservationSet getRedeeming(long cycle)
IServiceManagerPolicy
getRedeeming in interface IServiceManagerPolicycycle - the current cyclepublic ReservationSet getHoldings(long cycle)
IClientPolicy
getHoldings in interface IClientPolicypublic ReservationSet getHoldings()
IClientPolicy
getHoldings in interface IClientPolicy
public void ticketSatisfies(ResourceSet requestedResources,
ResourceSet actualResources,
Term requestedTerm,
Term actualTerm)
throws java.lang.Exception
IClientPolicy
ticketSatisfies in interface IClientPolicyrequestedResources - resources requested from brokeractualResources - resources received from brokerrequestedTerm - term requested from brokeractualTerm - term received from broker
java.lang.Exception
public void leaseSatisfies(ResourceSet requestedResources,
ResourceSet actualResources,
Term requestedTerm,
Term actualTerm)
throws java.lang.Exception
IServiceManagerPolicy
leaseSatisfies in interface IServiceManagerPolicyrequestedResources - resources requested from site authorityactualResources - resources received from site authorityrequestedTerm - term requested from site authorityactualTerm - term received from site authority
java.lang.Exception
public void revisit(IActor actor,
java.util.Properties p)
throws java.lang.Exception
IRecover
revisit in interface IRecoverrevisit in class Policyactor - actor object the component belongs top - properties list containing configuration data about the
component
java.lang.Exception
public void revisit(ResourceReservation reservation)
throws java.lang.Exception
IPolicy
revisit in interface IPolicyrevisit in class Policyjava.lang.Exception
public void reset()
throws java.lang.Exception
IPolicy
reset in interface IPolicyreset in class Policyjava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||