Interface RunContext

All Superinterfaces:
Observable

public interface RunContext extends 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 Details

    • getTraceConfiguration

      TraceConfiguration getTraceConfiguration()
      Returns the trace configuration for this context
      Returns:
      the trace configuration. It may be null.
    • setTraceConfiguration

      void setTraceConfiguration(TraceConfiguration traceConfiguration)
      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

      Object get(String key)
      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

      Object put(String key, Object value)
      Stores a key value pair
      Parameters:
      key - key with which the specified value is to be associated
      value - value to be associated with the specified key
      Returns:
      the previous value associated with key, or null if there was no mapping for key.
    • computeIfAbsent

      default Object computeIfAbsent(String key, Function<String,Object> mappingFunction)
      Strores a key value pair if the value is absent (or null)
      Parameters:
      key - key with which the specified value is to be associated
      mappingFunction - the mapping function to compute a value
      Returns:
      the previous value or the newly computed value.