@AccessLevel(value=EXTERNAL)
public final class ImmediateRecalculationStrategy
extends java.lang.Object
implements curam.creole.execution.session.RecalculationStrategy
Each recalculation may itself cause further recalculation requests to be made, which will be executed recursively.
The methods on this class are intended for use only by the assessment engine. Other clients must not invoke these methods.
Modifier and Type | Class and Description |
---|---|
protected class |
ImmediateRecalculationStrategy.SessionEventListeners |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<curam.creole.execution.session.Session,java.util.Queue> |
sessionAttributeValueRecalculators |
protected ImmediateRecalculationStrategy.SessionEventListeners |
sessionEventListeners |
protected curam.creole.execution.session.InternalSession.SessionListenerRegistrar |
sessionListenerRegistrar
The registrar which enables this recalculation strategy to listen for
recalculation requests.
|
Modifier | Constructor and Description |
---|---|
protected |
ImmediateRecalculationStrategy() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkRecalculationQueue(curam.creole.execution.AttributeValue<?> completedAttributeValue) |
protected void |
defer(curam.creole.execution.session.InternalSession session,
curam.creole.execution.session.AttributeValueRecalculator attributeValueRecalculator)
Queues the request for execution when the calculation stack is exhausted.
|
protected void |
recalculate(curam.creole.execution.session.AttributeValueRecalculator attributeValueRecalculator) |
void |
recalculationRequired(curam.creole.execution.session.AttributeValueRecalculator attributeValueRecalculator) |
curam.creole.execution.session.InternalSession.SessionListenerRegistrar |
sessionListenerRegistrar() |
protected final java.util.Map<curam.creole.execution.session.Session,java.util.Queue> sessionAttributeValueRecalculators
protected final ImmediateRecalculationStrategy.SessionEventListeners sessionEventListeners
protected final curam.creole.execution.session.InternalSession.SessionListenerRegistrar sessionListenerRegistrar
Note that this registrar does not register to listen for calculation end events, as to do so would prevent this strategy from being wrapped by others. Instead, the first time an attribute value for a particular session is queued, this strategy will start monitoring the session for calculation end events.
@Inject protected ImmediateRecalculationStrategy()
protected void checkRecalculationQueue(curam.creole.execution.AttributeValue<?> completedAttributeValue)
protected void defer(curam.creole.execution.session.InternalSession session, curam.creole.execution.session.AttributeValueRecalculator attributeValueRecalculator)
protected void recalculate(curam.creole.execution.session.AttributeValueRecalculator attributeValueRecalculator)
public void recalculationRequired(curam.creole.execution.session.AttributeValueRecalculator attributeValueRecalculator)
public curam.creole.execution.session.InternalSession.SessionListenerRegistrar sessionListenerRegistrar()
sessionListenerRegistrar
in interface curam.creole.execution.session.RecalculationStrategy