org.kie.internal.runtime.manager.context

## Class CorrelationKeyContext

- java.lang.Object
- - org.kie.internal.runtime.manager.context.CorrelationKeyContext

- All Implemented Interfaces:
    org.kie.api.runtime.manager.Context<CorrelationKey>

      public class CorrelationKeyContext
      extends Object
      implements org.kie.api.runtime.manager.Context<CorrelationKey>

  Context implementation to deliver capabilities to find proper `RuntimeEngine` instances based on correlation key instead of process instance id. Use by strategy:
  - PerProcessInstance
  To obtain instances of this context use one of the following static methods:
  - `get()` to get empty context when starting process instances
  - `get(CorrelationKey)` to get context for specific process instance

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CorrelationKeyContext(CorrelationKey key)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CorrelationKeyContext` | `get()` Returns new instance of `CorrelationKeyContext` without correlation key.
    `static CorrelationKeyContext` | `get(CorrelationKey key)` Returns new instance of `CorrelationKeyContext` with correlation key of already existing process instance
    `CorrelationKey` | `getContextId()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CorrelationKeyContext

          public CorrelationKeyContext(CorrelationKey key)

  - ### Method Detail

    - #### getContextId

          public CorrelationKey getContextId()

      Specified by:
        `getContextId` in interface `org.kie.api.runtime.manager.Context<CorrelationKey>`

    - #### get

          public static CorrelationKeyContext get()

      Returns new instance of `CorrelationKeyContext` without correlation key. Used for starting new instances of the process.
      Returns:

    - #### get

          public static CorrelationKeyContext get(CorrelationKey key)

      Returns new instance of `CorrelationKeyContext` with correlation key of already existing process instance
      Parameters:
        `key` - actual correlation key of process instance
      Returns:

Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.