Package com.ibm.decision.run
Interface RunContext
- All Superinterfaces:
Observable
Run context.
The run context can be used to parameterize an execution.
It is meant to be used for one execution only.
It is not meant to be shared by several executions.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
computeIfAbsent
(String key, Function<String, Object> mappingFunction) Strores a key value pair if the value is absent (or null)Returns a value stored in the runContextReturns the execution identifier.getTrace()
Returns the trace of execution.Returns the trace configuration for this contextStores a key value pairvoid
setTraceConfiguration
(TraceConfiguration traceConfiguration) Sets the trace configuration of this context.Methods inherited from interface com.ibm.rules.engine.observer.Observable
addAllObservers, addObserver, addObserver, getAllObservers, getSupportedObserverClasses, removeAllObservers, removeObserver, removeObserver, removeObservers
-
Method Details
-
getTraceConfiguration
TraceConfiguration getTraceConfiguration()Returns the trace configuration for this context- Returns:
- the trace configuration. It may be null.
-
setTraceConfiguration
Sets the trace configuration of this context. A null can be passes. In this case there will be no trace.- Parameters:
traceConfiguration
- the trace configuration. It may be null.
-
getTrace
Trace getTrace()Returns the trace of execution. It may be null if the trace configuration is null.- Returns:
- the trace of execution. It may be null if the trace configuration is null.
-
getExecutionId
String getExecutionId()Returns the execution identifier.- Returns:
- the execution identifier.
-
get
Returns a value stored in the runContext- Parameters:
key
- the key whose associated value is to be returned*- Returns:
- the value to which the specified key is mapped, or null if this map contains no mapping for the key
-
put
Stores a key value pair- Parameters:
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified key- Returns:
- the previous value associated with
key
, ornull
if there was no mapping forkey
.
-
computeIfAbsent
Strores a key value pair if the value is absent (or null)- Parameters:
key
- key with which the specified value is to be associatedmappingFunction
- the mapping function to compute a value- Returns:
- the previous value or the newly computed value.
-