Package org.kie.api.runtime.conf

## Class PersistedSessionOption

- java.lang.Object
- - org.kie.api.runtime.conf.PersistedSessionOption

- All Implemented Interfaces:
    `java.io.Serializable`, `Option`, `SingleValueOption`, `KieSessionOption`, `SingleValueKieSessionOption`

      public class PersistedSessionOption
      extends java.lang.Object
      implements SingleValueKieSessionOption

  A class for the session persistence configuration.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `PersistedSessionOption.PersistenceStrategy` |
    `static class` | `PersistedSessionOption.SafepointStrategy` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `PROPERTY_NAME` | The property name for the clock type configuration

    - ### Fields inherited from interface org.kie.api.runtime.conf.KieSessionOption

      `TYPE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(java.lang.Object o)` |
    `static PersistedSessionOption` | `fromSession​(long sessionId)` |
    `PersistedSessionOption.PersistenceStrategy` | `getPersistenceStrategy()` |
    `java.lang.String` | `getPropertyName()`
    `PersistedSessionOption.SafepointStrategy` | `getSafepointStrategy()` |
    `long` | `getSessionId()` |
    `int` | `hashCode()` |
    `boolean` | `isNewSession()` |
    `static PersistedSessionOption` | `newSession()` |
    `java.lang.String` | `toString()` |
    `PersistedSessionOption` | `withPersistenceStrategy​(PersistedSessionOption.PersistenceStrategy persistenceStrategy)` |
    `PersistedSessionOption` | `withSafepointStrategy​(PersistedSessionOption.SafepointStrategy safepointStrategy)` |

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.kie.api.runtime.conf.KieSessionOption

      `type`

    - ### Methods inherited from interface org.kie.api.conf.Option

      `propertyName`

- - ### Field Detail

    - #### PROPERTY_NAME

          public static final java.lang.String PROPERTY_NAME

      The property name for the clock type configuration
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### newSession

          public static PersistedSessionOption newSession()

    - #### fromSession

          public static PersistedSessionOption fromSession​(long sessionId)

    - #### getPropertyName

          public java.lang.String getPropertyName()

      Specified by:
        `getPropertyName` in interface `Option`
      Returns:
        the property name for this option

    - #### getSessionId

          public long getSessionId()

    - #### getPersistenceStrategy

          public PersistedSessionOption.PersistenceStrategy getPersistenceStrategy()

    - #### withPersistenceStrategy

          public PersistedSessionOption withPersistenceStrategy​(PersistedSessionOption.PersistenceStrategy persistenceStrategy)

    - #### getSafepointStrategy

          public PersistedSessionOption.SafepointStrategy getSafepointStrategy()

    - #### withSafepointStrategy

          public PersistedSessionOption withSafepointStrategy​(PersistedSessionOption.SafepointStrategy safepointStrategy)

    - #### isNewSession

          public boolean isNewSession()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### equals

          public boolean equals​(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`