|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlbg.peer.strategy.scheduling.consumption.CommonConsumptionScheduling
public abstract class CommonConsumptionScheduling
Reliability-ranked use of Consumption Grants.
Constructor Summary | |
---|---|
CommonConsumptionScheduling(Peer managed_peer,
Scheduler scheduler)
|
Method Summary | |
---|---|
protected static boolean |
assertConsumptionGrantsAvailability(ConsumptionGrantsContainer c_g,
int peer_idx)
|
protected abstract LocalQueueCursor |
getLocalQueueCursor()
Local Queue Cursor accessor. |
protected abstract Ranking |
rankSuppliers(ConsumptionGrantsContainer c_g,
RequestContainer rc)
Rank Suppliers. |
int |
scheduleConsumptionTasks()
ConsumptionSchedulingPolicy implementation. |
protected RequestContainer |
scheduleFirstConsumptionTask()
Schedules first queued Local Task as a Consumption Task. |
protected RequestContainer |
scheduleNextConsumptionTask(LocalQueueCursor lqc)
Schedules next queued Local Task as a Consumption Task. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CommonConsumptionScheduling(Peer managed_peer, Scheduler scheduler) throws GridException
GridException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int scheduleConsumptionTasks() throws GridException
Note: this implementation requires that getLocalQueueCursor() returns a non-null reference to an existing Local Queue Cursor.
scheduleConsumptionTasks
in interface ConsumptionSchedulingPolicy
GridException
- if an error occurs
while using Consumption Grants to schedule Consumption Tasksprotected abstract Ranking rankSuppliers(ConsumptionGrantsContainer c_g, RequestContainer rc) throws GridException
c_g
- collected Consumption Grants containerrc
- target Task container
GridException
- if a problem occured while ranking Suppliersprotected abstract LocalQueueCursor getLocalQueueCursor()
protected RequestContainer scheduleFirstConsumptionTask() throws GridException
GridException
- if there is no Consumption Task to scheduleprotected RequestContainer scheduleNextConsumptionTask(LocalQueueCursor lqc) throws GridException
lqc
- Local Queue Cursor
GridException
- if a parameter is illegalprotected static boolean assertConsumptionGrantsAvailability(ConsumptionGrantsContainer c_g, int peer_idx) throws GridException
GridException
|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.