orca.policy.core
Class BrokerPriorityPolicyPlugin
java.lang.Object
orca.shirako.core.Policy
orca.shirako.core.BrokerPolicy
orca.policy.core.BrokerBasePolicyPlugin
orca.policy.core.BrokerSimplePolicyPlugin
orca.policy.core.BrokerPriorityPolicyPlugin
- All Implemented Interfaces:
- IBrokerPolicy, IClientPolicy, IInitialize, IPolicy, IRecover, ISerialize, IServerPolicy
- Direct Known Subclasses:
- BrokerBestFitPolicyPlugin, BrokerWorstFitMultiplePoolsPolicyPlugin, BrokerWorstFitPolicyPlugin
public class BrokerPriorityPolicyPlugin
- extends BrokerSimplePolicyPlugin
AgentPriorityPolicyPlugin is an extension of the simple
implementation of an agent's plugin interface. It buffers requests for
allocation periods and when it performs allocations of resources. It
allocates requests based on requestType priorities set in the configuration
at the broker. There may be multiple requestTypes with the same priority.
Within each priority class, requests are allocated FIFO. Within each priority
class it gives priority to extending reservations followed by new
reservations.
- Author:
- grit
|
Method Summary |
void |
addRequestType(int priority,
java.lang.String requestType)
|
void |
allocate(long cycle)
Allows additional configuration of priority between multiple types of
requests as specified in REQUEST_TYPE. |
void |
configure(java.util.Properties p)
Processes a list of configuration properties |
| Methods inherited from class orca.policy.core.BrokerSimplePolicyPlugin |
allocateExtending, allocateNewBids, bind, calculateAvailable, createSourceHashtable, extend, extractTicket, formulateBids, getAllocation, getApprovedTerm, getNextAllocation, getRenew, getStartForAllocation, prepare, processRenewing, query, satisfyAllocation, switchSource, verifyWantedResources |
| Methods inherited from class orca.policy.core.BrokerBasePolicyPlugin |
addForApproval, addForApprovalCalendar, addToCalendar, approve, checkPending, close, closed, count, donate, finish, getClosing, getForApproval, initialize, notApprove, release, release, releaseNotApproved, remove, removeForApproval, revisit, revisitClient, revisitServer |
| Methods inherited from class orca.shirako.core.Policy |
error, extend, getGuid, internalError, logError, logWarn, reset, save, save, setActor, setLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyRequestTypeCount
public static final java.lang.String PropertyRequestTypeCount
- See Also:
- Constant Field Values
PropertyRequestTypeName
public static final java.lang.String PropertyRequestTypeName
- See Also:
- Constant Field Values
PropertyRequestTypePriority
public static final java.lang.String PropertyRequestTypePriority
- See Also:
- Constant Field Values
requestTypePriorities
protected java.util.Vector<RequestTypePriority> requestTypePriorities
BrokerPriorityPolicyPlugin
public BrokerPriorityPolicyPlugin()
configure
public void configure(java.util.Properties p)
throws java.lang.Exception
- Processes a list of configuration properties
- Parameters:
p -
- Throws:
java.lang.Exception
addRequestType
public void addRequestType(int priority,
java.lang.String requestType)
allocate
public void allocate(long cycle)
throws java.lang.Exception
- Allows additional configuration of priority between multiple types of
requests as specified in
REQUEST_TYPE. For example,
requests for "master" nodes may be given priority over "worker" requests.
Run an allocation of requests against all sources, given a set of pending
bids by using FCFS giving extends priority. This simple policy runs
through the bids in iterator order, and give every request
min(requested,available) until we run out. It gives
priority to extending requests compared to new requests. Assumes that
there is only 1 source reservation per type. Makes the assumption that we
allocate resources sequentially in time, so there are never less
resources available in the future.
Allocates resources to all clients who have requested them. This method
is called by the policy once per cycle. The method should determine
whether to perform resource allocation on the given cycle and what
requests to consider in that process. This method is invoked with the
kernel lock on.
- Specified by:
allocate in interface IServerPolicy- Overrides:
allocate in class BrokerSimplePolicyPlugin
- Parameters:
cycle - the cycle for this allocation
- Throws:
java.lang.Exception
Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.