|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.service.task.FixedTimeContinuePolicy
public class FixedTimeContinuePolicy
An implementation of ContinuePolicy that always provides
positive continuation feedback until a fixed amount of time has elapsed
in the current transaction. After this time period has elapsed, feedback
is always negative for the given transaction. This time period is
configurable via the following configuration property:
"com.sun.sgs.impl.service.task.continue.threshold"
shouldContinue method will return
true. After this period of time has elapsed in a transaction,
this method will always return false.
| Field Summary | |
|---|---|
static long |
CONTINUE_THRESHOLD_DEFAULT
The default continue threshold. |
static String |
CONTINUE_THRESHOLD_PROPERTY
The property key to set how long a task should run before shouldContinue returns false. |
| Constructor Summary | |
|---|---|
FixedTimeContinuePolicy(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy)
Construct a FixedTimeContinuePolicy instance. |
|
| Method Summary | |
|---|---|
boolean |
shouldContinue()
Returns true if the currently running task should do more work
if it is available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONTINUE_THRESHOLD_PROPERTY
shouldContinue returns false.
public static final long CONTINUE_THRESHOLD_DEFAULT
| Constructor Detail |
|---|
public FixedTimeContinuePolicy(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy)
FixedTimeContinuePolicy instance.
properties - the system propertiessystemRegistry - the system registrytxnProxy - the system's transaction proxy| Method Detail |
|---|
public boolean shouldContinue()
true if the currently running task should do more work
if it is available. Otherwise, returns false. This method
should only be called from a transactional context.
shouldContinue in interface ContinuePolicytrue if the currently running task should do more work
if possible; otherwise falseTaskManager.shouldContinue()
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||