public final class AsynchronousViewLifecycleProcessor extends ViewLifecycleProcessorBase
ViewLifecycle
across multiple threads.Modifier and Type | Method and Description |
---|---|
ViewLifecyclePhase |
getActivePhase()
Gets the phase actively being processing on the current thread.
|
ExpressionEvaluator |
getExpressionEvaluator()
Returns an instance of
ExpressionEvaluator that can be
used for evaluating expressions contained on the view. |
static int |
getMaxThreads()
Gets the maximum number of lifecycle worker threads to maintain.
|
static int |
getMinThreads()
Gets the minimum number of lifecycle worker threads to maintain.
|
LifecycleRenderingContext |
getRenderingContext()
Gets a thread-local rending context for invoking FreeMarker operations on the current thread.
|
static long |
getTimeout()
Gets the time, in milliseconds, to wait for a initial phase to process.
|
void |
offerPendingPhase(ViewLifecyclePhase phase)
Queues a lifecycle phase to be processed within the lifecycle associated with this processor.
|
void |
performPhase(ViewLifecyclePhase initialPhase)
Performs a lifecycle phase according to this processor's semantics, blocking until the phase
has been completely processed.
|
void |
pushPendingPhase(ViewLifecyclePhase phase)
Pushes lifecycle phases to be processed within the lifecycle associated with this processor.
|
getLifecycle
public static int getMinThreads()
This value is controlled by the configuration parameter "krad.uif.lifecycle.asynchronous.minThreads".
public static int getMaxThreads()
This value is controlled by the configuration parameter "krad.uif.lifecycle.asynchronous.maxThreads".
public static long getTimeout()
This value is controlled by the configuration parameter "krad.uif.lifecycle.asynchronous.timeout".
public ViewLifecyclePhase getActivePhase()
public LifecycleRenderingContext getRenderingContext()
public ExpressionEvaluator getExpressionEvaluator()
ExpressionEvaluator
that can be
used for evaluating expressions contained on the view.
A ExpressionEvaluator must be initialized with a model for expression evaluation. One instance is constructed for the view lifecycle and made available to all components/helpers through this method
public void pushPendingPhase(ViewLifecyclePhase phase)
A phase submitted using this method will be added to the front of the queue, to be processed by the next available processor.
phase
- The phase to be processed within the lifecycle associated with this processor.public void offerPendingPhase(ViewLifecyclePhase phase)
A phase submitted using this method will be added to the end of the queue, to be processed after all other phases currently in the queue have been submitted.
phase
- The phase to be processed within the lifecycle associated with this processor.public void performPhase(ViewLifecyclePhase initialPhase)
This method should only be called a single time by the controlling thread in order to wait for all pending phases to be performed, and should not be called by any worker threads.
initialPhase
- The initial lifecycle phaseCopyright © 2005–2015 The Kuali Foundation. All rights reserved.