public class AbortJob extends Job implements TransactionConstants
com.sun.jini.mahalo.Job
which
interacts with a set of
net.jini.core.transaction.server.TransactionParticipant
s
to inform them to roll back changes associated with a given
net.jini.core.transaction.Transaction
.Job
,
ParticipantTask
,
Transaction
,
TransactionParticipant
Modifier and Type | Field and Description |
---|---|
(package private) ParticipantHandle[] |
handles |
(package private) ClientLog |
log |
(package private) static Logger |
logger |
(package private) int |
maxtries |
(package private) ServerTransaction |
tr |
ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING
Constructor and Description |
---|
AbortJob(Transaction tr,
TaskManager pool,
WakeupManager wm,
ClientLog log,
ParticipantHandle[] handles)
Constructs an
AbortJob |
Modifier and Type | Method and Description |
---|---|
(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 roll-back. |
(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. |
attempt, getMgr, getPool, isCompleted, performWork, scheduleTasks, stop
ServerTransaction tr
ClientLog log
ParticipantHandle[] handles
int maxtries
static final Logger logger
public AbortJob(Transaction tr, TaskManager pool, WakeupManager wm, ClientLog log, ParticipantHandle[] handles)
AbortJob
tr
- The Transaction
whose participants
will be instructed to roll-back.pool
- 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 roll-back.TaskManager
,
ClientLog
,
TransactionParticipant
TaskManager.Task[] createTasks()
TaskManager.Task
s necessary to
inform participants to roll-back.createTasks
in class Job
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 roll-back 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
Object computeResult() throws JobException
computeResult
in class Job
JobException
Job
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.