com.sun.jini.mahalo
Class SettlerTask

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

public class SettlerTask
extends RetryTask
implements TransactionConstants

A SettlerTask is scheduled task, which causes an unsettled transaction to settle.

Author:
Sun Microsystems, Inc.

Field Summary
private  int attempt
           
private  int maxtries
           
private static Logger operationsLogger
          Logger for operations related messages
private  long tid
           
private static Logger transactionsLogger
          Logger for transactions related messages
private  TransactionManager txnmgr
           
 
Fields inherited from interface net.jini.core.transaction.server.TransactionConstants
ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING
 
Fields inherited from interface com.sun.jini.constants.TimeConstants
DAYS, HOURS, MINUTES, SECONDS
 
Constructor Summary
SettlerTask(TaskManager manager, WakeupManager wm, TransactionManager txnmgr, long tid)
          Constructs a SettlerTask.
 
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

tid

private long tid

attempt

private int attempt

maxtries

private int maxtries

txnmgr

private TransactionManager txnmgr

operationsLogger

private static final Logger operationsLogger
Logger for operations related messages


transactionsLogger

private static final Logger transactionsLogger
Logger for transactions related messages

Constructor Detail

SettlerTask

public SettlerTask(TaskManager manager,
                   WakeupManager wm,
                   TransactionManager txnmgr,
                   long tid)
Constructs a SettlerTask.

Parameters:
manager - TaskManager providing the threads of execution.
txnmgr - TransactionManager which owns the the transaction.
tid - transaction ID
Method Detail

runAfter

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

Specified by:
runAfter in interface TaskManager.Task
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.