com.sun.jini.mahalo
Class ParticipantTask

java.lang.Object
  extended by com.sun.jini.thread.RetryTask
      extended by com.sun.jini.mahalo.ParticipantTask
All Implemented Interfaces:
TimeConstants, TaskManager.Task, Runnable

public class ParticipantTask
extends RetryTask

A ParticipantTask is a general task which interacts with a participant.

Author:
Sun Microsystems, Inc.
See Also:
TransactionParticipant, TaskManager

Field Summary
(package private)  ParticipantHandle handle
           
(package private)  Job myjob
           
private static Logger operationsLogger
           
 
Fields inherited from interface com.sun.jini.constants.TimeConstants
DAYS, HOURS, MINUTES, SECONDS
 
Constructor Summary
ParticipantTask(TaskManager manager, WakeupManager wm, Job myjob, ParticipantHandle handle)
          Constructs a ParticipantTask.
 
Method Summary
 boolean runAfter(List list, int max)
          Inherit doc comment from supertype.
 boolean tryOnce()
          Make a single attempt.
 
Methods inherited from class com.sun.jini.thread.RetryTask
attempt, cancel, cancelled, complete, reset, retryTime, run, startTime, waitFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handle

ParticipantHandle handle

myjob

Job myjob

operationsLogger

private static final Logger operationsLogger
Constructor Detail

ParticipantTask

public ParticipantTask(TaskManager manager,
                       WakeupManager wm,
                       Job myjob,
                       ParticipantHandle handle)
Constructs a ParticipantTask.

Parameters:
manager - TaskManager providing the threads of execution.
myjob - Job to which this task belongs.
handle - ParticipantHandle representing the TransactionParticipant with which this task interacts.
Method Detail

runAfter

public boolean runAfter(List list,
                        int max)
Inherit doc comment from supertype.

Parameters:
list - the tasks to consider. A read-only List, with all elements instanceof Task.
max - elements with index less than size should be considered
See Also:
RetryTask

tryOnce

public boolean tryOnce()
Description copied from class: RetryTask
Make a single attempt. Return true if the attempt was successful. If the attempt is not successful, the task will be scheduled for a future retry.

Specified by:
tryOnce in class RetryTask


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.