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.Object
Handler for a single task allocation.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
open
The counter for open tasks, i.e. number of assigned and unassigned tasks that are not yet finished.protected IntermediateFuture
result
The result future.protected boolean
retry
The retry flag, i.e. if failed tasks should be assigned again.protected java.lang.Object
user
The 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 IntermediateFuture
getResult()
Get the result.java.lang.Object
getUserData()
Get the user data.boolean
isRetry()
Test if the retry flag is set.void
taskFailed(java.lang.Exception e)
A task has failed and is not retried.void
taskFinished(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.
-
-