com.sun.jini.mahalo
Class AbortJob
java.lang.Object
com.sun.jini.mahalo.Job
com.sun.jini.mahalo.AbortJob
- All Implemented Interfaces:
- TransactionConstants
public class AbortJob
- extends Job
- implements TransactionConstants
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 roll back changes associated with a given
net.jini.core.transaction.Transaction
.
- Author:
- Sun Microsystems, Inc.
- See Also:
Job
,
ParticipantTask
,
Transaction
,
TransactionParticipant
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 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tr
ServerTransaction tr
log
ClientLog log
handles
ParticipantHandle[] handles
maxtries
int maxtries
logger
static final Logger logger
AbortJob
public AbortJob(Transaction tr,
TaskManager pool,
WakeupManager wm,
ClientLog log,
ParticipantHandle[] handles)
- Constructs an
AbortJob
- Parameters:
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.- See Also:
TaskManager
,
ClientLog
,
TransactionParticipant
createTasks
TaskManager.Task[] createTasks()
- Creates the
TaskManager.Task
s necessary to
inform participants to roll-back.
- Specified by:
createTasks
in class Job
doWork
Object doWork(TaskManager.Task who,
Object param)
- The work to be performed by each
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.
- Specified by:
doWork
in class Job
- Parameters:
who
- The task performing the workparam
- A parameter, of the task's choosing, useful
in performing work.- See Also:
Job
,
TaskManager.Task
computeResult
Object computeResult()
throws JobException
- Gathers partial results submitted by tasks and produces
a single outcome.
- Specified by:
computeResult
in class Job
- Throws:
JobException
- See Also:
Job
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.