|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Transitioner
State machine for tasks. It controls transitions of tasks between work and result queues.
Method Summary | |
---|---|
void |
addIngressResult(Result r)
Enqueues a result in the ingress result queue. |
void |
addIngressWorkUnit(WorkUnit wu)
Enqueues a work unit in the ingress work queue. |
Result[] |
getAssociatedIngressResults(WorkUnit wu)
Finds all ingress Results associated with a given WorkUnit. |
Result[] |
getAssociatedPendingResults(WorkUnit wu)
Finds all pending Results associated with a given WorkUnit. |
TransitionerQueue<WorkUnit> |
getCanonicalWorkQueue()
|
WorkUnit |
getCanonicalWorkUnit()
Gets the first WorkUnit that has enough Results. |
TransitionerQueue<Result> |
getIngressResultQueue()
|
TransitionerQueue<WorkUnit> |
getIngressWorkQueue()
|
TransitionerQueue<Result> |
getPendingResultQueue()
|
TransitionerQueue<WorkUnit> |
getPendingWorkQueue()
|
Result |
getResult()
Gets the first result that needs to be validated. |
TransitionerQueue<WorkUnit> |
getRetiredWorkQueue()
|
TransitionerQueue<Result> |
getValidResultQueue()
|
WorkUnit |
getWorkUnit(Volunteer v)
Gets the next work unit to be processed. |
void |
markResultInvalid(Result invalidResult)
Marks a result as invalid. |
void |
markResultValid(Result validResult)
Marks a Result as valid. |
void |
selectCanonicalResult(Result canonicalResult)
Designates a canonical Result by removing all related results from the ingress and pending queues, adding the canonical result to the valid queue, and retiring the canonical result's work unit. |
void |
shutdown()
Performs any necessary tasks to safely shut down the Transitioner. |
Method Detail |
---|
TransitionerQueue<WorkUnit> getIngressWorkQueue()
TransitionerQueue<WorkUnit> getPendingWorkQueue()
TransitionerQueue<WorkUnit> getCanonicalWorkQueue()
TransitionerQueue<WorkUnit> getRetiredWorkQueue()
TransitionerQueue<Result> getIngressResultQueue()
TransitionerQueue<Result> getPendingResultQueue()
TransitionerQueue<Result> getValidResultQueue()
void addIngressWorkUnit(WorkUnit wu)
wu
- The work unit to add.void addIngressResult(Result r)
r
- The result to add.Result[] getAssociatedIngressResults(WorkUnit wu)
wu
- The WorkUnit for which to find all associated ingress Results.
Result[] getAssociatedPendingResults(WorkUnit wu)
wu
- The WorkUnit for which to find all associated pending Results.
WorkUnit getWorkUnit(Volunteer v) throws EmptyQueueException
v
- The volunteer who will receive t
EmptyQueueException
WorkUnit getCanonicalWorkUnit() throws EmptyQueueException
EmptyQueueException
Result getResult() throws EmptyQueueException
EmptyQueueException
void markResultValid(Result validResult)
validResult
- The result from the ingress result queue to be marked valid.void markResultInvalid(Result invalidResult)
invalidResult
- The result to be marked invalid.void selectCanonicalResult(Result canonicalResult)
canonicalResult
- The canonical result to select.void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |