Interface SessionPersistedObjectAnalyzer<T>

All Known Implementing Classes:
DefaultSessionPersistedObjectAnalyzer, OptimizedSessionPersistedObjectAnalyzer

Analyzes a session-persisted object, specifically to see if it is dirty or not. This service is provided to support applications which store mutable session attributes where the session is replicated to a slower medium (e.g. RDMBS, Cluster, etc) this can help alleviate excessive writes to the session store while ensuring changes are propagated. The service implementation uses a mapped configuration to form a strategy based on object type. The service may be injected using the Primary marker annotation.
Since:
5.1.0.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkAndResetDirtyState(T sessionPersistedObject)
    Atomically check and reset the dirty state of the session persisted object.
  • Method Details

    • checkAndResetDirtyState

      boolean checkAndResetDirtyState(T sessionPersistedObject)
      Atomically check and reset the dirty state of the session persisted object. The implementer should take consideration for the fact that session attributes are accessed concurrently. A naive check/set algorithm may allow changes to go un-noticed.
      Parameters:
      sessionPersistedObject - the session attribute (never null)
      Returns:
      true if the object needs to be re-stored into the session
      Since:
      5.3