Class AsynchronousViewLifecycleProcessor
- All Implemented Interfaces:
ViewLifecycleProcessor
ViewLifecycle
across multiple threads.- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionGets the phase actively being processing on the current thread.Returns an instance ofExpressionEvaluatorthat can be used for evaluating expressions contained on the view.static intGets the maximum number of lifecycle worker threads to maintain.static intGets the minimum number of lifecycle worker threads to maintain.Gets a thread-local rending context for invoking FreeMarker operations on the current thread.static longGets the time, in milliseconds, to wait for a initial phase to process.voidQueues a lifecycle phase to be processed within the lifecycle associated with this processor.voidperformPhase(ViewLifecyclePhase initialPhase) Performs a lifecycle phase according to this processor's semantics, blocking until the phase has been completely processed.voidPushes lifecycle phases to be processed within the lifecycle associated with this processor.Methods inherited from class org.kuali.rice.krad.uif.lifecycle.ViewLifecycleProcessorBase
getLifecycle
-
Method Details
-
getMinThreads
public static int getMinThreads()Gets the minimum number of lifecycle worker threads to maintain.This value is controlled by the configuration parameter "krad.uif.lifecycle.asynchronous.minThreads".
- Returns:
- minimum number of worker threads to maintain
-
getMaxThreads
public static int getMaxThreads()Gets the maximum number of lifecycle worker threads to maintain.This value is controlled by the configuration parameter "krad.uif.lifecycle.asynchronous.maxThreads".
- Returns:
- maximum number of worker threads to maintain
-
getTimeout
public static long getTimeout()Gets the time, in milliseconds, to wait for a initial phase to process.This value is controlled by the configuration parameter "krad.uif.lifecycle.asynchronous.timeout".
- Returns:
- time in milliseconds to wait for the initial phase to process
-
getActivePhase
Gets the phase actively being processing on the current thread.- Returns:
- lifecycle phase active on the current thread
-
getRenderingContext
Gets a thread-local rending context for invoking FreeMarker operations on the current thread.- Returns:
- rending context for invoking FreeMarker operations on the current thread
-
getExpressionEvaluator
Returns an instance ofExpressionEvaluatorthat 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
- Returns:
- instance of ExpressionEvaluator
-
pushPendingPhase
Pushes lifecycle phases to be processed within the lifecycle associated with this processor.A phase submitted using this method will be added to the front of the queue, to be processed by the next available processor.
- Parameters:
phase- The phase to be processed within the lifecycle associated with this processor.
-
offerPendingPhase
Queues a lifecycle phase to be processed within the lifecycle associated with this processor.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.
- Parameters:
phase- The phase to be processed within the lifecycle associated with this processor.
-
performPhase
Performs a lifecycle phase according to this processor's semantics, blocking until the phase has been completely processed. Once the initial phase has been completely processed, this method will return.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.
- Parameters:
initialPhase- The initial lifecycle phase
-