|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.mahalo.Job
com.sun.jini.mahalo.PrepareJob
public class PrepareJob
An implementation of a com.sun.jini.mahalo.Job
which
interacts with a set of
net.jini.core.transaction.server.TransactionParticipant
s
to inform them to vote.
Job
,
ParticipantTask
,
Transaction
,
TransactionParticipant
Field Summary | |
---|---|
(package private) ParticipantHandle[] |
handles
|
(package private) ClientLog |
log
|
(package private) int |
maxtries
|
private static Logger |
operationsLogger
Logger for operations related messages |
private static Logger |
persistenceLogger
Logger for persistence related messages |
(package private) ServerTransaction |
tr
|
Fields inherited from class com.sun.jini.mahalo.Job |
---|
attempts, logger, results |
Fields inherited from interface net.jini.core.transaction.server.TransactionConstants |
---|
ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING |
Constructor Summary | |
---|---|
PrepareJob(Transaction tr,
TaskManager pool,
WakeupManager wm,
ClientLog log,
ParticipantHandle[] handles)
Constructs an PrepareJob |
Method Summary | |
---|---|
(package private) Object |
computeResult()
Gathers partial results submitted by tasks and produces a single outcome. |
(package private) TaskManager.Task[] |
createTasks()
Creates the TaskManager.Task s necessary to
inform participants to vote. |
(package private) Object |
doWork(TaskManager.Task who,
Object param)
The work to be performed by each TaskManager.Task
is provided by the Job that creates it. |
Methods inherited from class com.sun.jini.mahalo.Job |
---|
attempt, getMgr, getPool, isCompleted, performWork, scheduleTasks, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
ServerTransaction tr
ClientLog log
ParticipantHandle[] handles
int maxtries
private static final Logger operationsLogger
private static final Logger persistenceLogger
Constructor Detail |
---|
public PrepareJob(Transaction tr, TaskManager pool, WakeupManager wm, ClientLog log, ParticipantHandle[] handles)
PrepareJob
tr
- The Transaction
whose participants
will be instructed to votepool
- The TaskManager
which provides the
threads used for interacting with participants.log
- The ClientLog
used for recording
recovery data.handles
- The array of participants which will be contacted
and informed to voteTaskManager
,
ClientLog
,
TransactionParticipant
Method Detail |
---|
Object doWork(TaskManager.Task who, Object param)
TaskManager.Task
is provided by the Job
that creates it.
The work performed by a task belonging to the AbortJob
contacts a participant, instructs it to vote and
log appropriately.
doWork
in class Job
who
- The task performing the workparam
- A parameter, of the task's choosing, useful
in performing work.Job
,
TaskManager.Task
TaskManager.Task[] createTasks()
TaskManager.Task
s necessary to
inform participants to vote.
createTasks
in class Job
Object computeResult() throws JobException
computeResult
in class Job
JobException
Job
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |