public interface TaskGlobalObject extends RamaSerializable, java.io.Closeable
RamaModule.Setup.declareObject(String, Object)
can specialize their implementation per task. References to the declared var will see the
specific instance of this object built for that task.prepareForTask(int, com.rpl.rama.integration.TaskGlobalContext)
.InProcessCluster
.Modifier and Type | Method and Description |
---|---|
default void |
gainedLeadership()
This function is called on this object whenever the task on which it lives gains leadership.
|
void |
prepareForTask(int taskId,
TaskGlobalContext context)
Specializes this object for this particular task ID.
|
void prepareForTask(int taskId, TaskGlobalContext context)
taskId
- Task ID on which this object will livecontext
- Contextual informationdefault void gainedLeadership()