| |
|
| java.lang.Object com.uwyn.rife.continuations.ContinuationConfigRuntime
ContinuationConfigRuntime | abstract public class ContinuationConfigRuntime (Code) | | Configures the runtime behavior of the continuations engine.
The active runtime configuration always has to be available through
ContinuationConfigRuntime.getActiveConfigRuntime() when a
ContinuableObject is
executed. Therefore, it's best to always call
ContinuationConfigRuntime.setActiveConfigRuntime before the executing. The
com.uwyn.rife.continuations.basic.BasicContinuableRunner does
this by default. If you create your own runner, you have to ensure that
this is respected.
By default the lifetime duration and purging of
ContinuableObject instances is set to a sensible default, so this only needs tuning in
specific case.
This class has to be extended though to provide information that suits
your continuations usage and to indicate whether continuations should be
cloned when they are resumed.
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3810 $ since: 1.6 |
DEFAULT_CONTINUATION_DURATION | final public static long DEFAULT_CONTINUATION_DURATION(Code) | | The default duration is 20 minutes.
since: 1.6 |
DEFAULT_CONTINUATION_PURGE_FREQUENCY | final public static int DEFAULT_CONTINUATION_PURGE_FREQUENCY(Code) | | The default frequency is every 20 times out of the scale, with the
default scale of 1000 this means, 1/50th of the time.
since: 1.6 |
DEFAULT_CONTINUATION_PURGE_SCALE | final public static int DEFAULT_CONTINUATION_PURGE_SCALE(Code) | | The default purge scale is 1000.
since: 1.6 |
cloneContinuations | abstract public boolean cloneContinuations(T executingContinuable)(Code) | | Indicates whether a continuable should be cloned before resuming the
execution.
Parameters: executingContinuable - the currently executing continuable true is the continuation should be cloned; or false otherwise since: 1.6 |
getAssociatedContinuableObject | abstract public T getAssociatedContinuableObject(Object executingInstance)(Code) | | Retrieves the
ContinuableObject that corresponds to the currently
executing object instance.
If you don't work with a seperate continuable support class
(
ContinuationConfigInstrument.getContinuableSupportClassName see here )
and don't allow people to just implement a marker interface without having
to extend a base class, the associated continuable object is the same as
the executing instance.
However, if there is a separate continuable support class, you'll need
to return the appropriate continuable object here.
Parameters: executingInstance - the currently executing object instance the executing ContinuableObject See Also: ContinuationConfigInstrument.getContinuableSupportClassName since: 1.6 |
getContinuationDuration | public long getContinuationDuration()(Code) | | The duration, in milliseconds, by which a continuation stays valid.
When this period is exceeded, a continuation can not be retrieved
anymore and it will be removed from the manager during the next purge.
the validity duration of a continuation in milliseconds since: 1.6 |
getContinuationManager | abstract public ContinuationManager getContinuationManager(T executingContinuable)(Code) | | Retrieves the manager that is responsible for the
ContinuableObject that is currently executing.
Parameters: executingContinuable - the currently executing continuable the corresponding manager since: 1.6 |
setActiveConfigRuntime | public static void setActiveConfigRuntime(ContinuationConfigRuntime config)(Code) | | Sets the active runtime configuration for the executing thread.
Parameters: config - the active runtime configuration for the executing thread since: 1.6 |
|
|
|