Package jadex.micro.examples.mandelbrot
Class ServicePoolManager.AllocationData
- java.lang.Object
-
- jadex.micro.examples.mandelbrot.ServicePoolManager.AllocationData
-
- Enclosing class:
- ServicePoolManager
public static class ServicePoolManager.AllocationData extends java.lang.ObjectHandler for a single task allocation.
-
-
Field Summary
Fields Modifier and Type Field Description protected intopenThe counter for open tasks, i.e. number of assigned and unassigned tasks that are not yet finished.protected IntermediateFutureresultThe result future.protected booleanretryThe retry flag, i.e. if failed tasks should be assigned again.protected java.lang.ObjectuserThe user data (if any).
-
Constructor Summary
Constructors Constructor Description AllocationData(int open, boolean retry, java.lang.Object user)Create a new allocation data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntermediateFuturegetResult()Get the result.java.lang.ObjectgetUserData()Get the user data.booleanisRetry()Test if the retry flag is set.voidtaskFailed(java.lang.Exception e)A task has failed and is not retried.voidtaskFinished(java.lang.Object result)Add an intermediate result.
-
-
-
Field Detail
-
open
protected int open
The counter for open tasks, i.e. number of assigned and unassigned tasks that are not yet finished.
-
retry
protected boolean retry
The retry flag, i.e. if failed tasks should be assigned again.
-
user
protected java.lang.Object user
The user data (if any).
-
result
protected IntermediateFuture result
The result future.
-
-
Method Detail
-
getUserData
public java.lang.Object getUserData()
Get the user data.- Returns:
- The user data (if any).
-
getResult
public IntermediateFuture getResult()
Get the result.- Returns:
- The intermediate results future.
-
taskFinished
public void taskFinished(java.lang.Object result)
Add an intermediate result.
-
taskFailed
public void taskFailed(java.lang.Exception e)
A task has failed and is not retried.
-
isRetry
public boolean isRetry()
Test if the retry flag is set.- Returns:
- True, if the retry flag is set.
-
-