Interface SessionPersistedObjectAnalyzer<T>

All Known Implementing Classes:
DefaultSessionPersistedObjectAnalyzer, OptimizedSessionPersistedObjectAnalyzer

public interface SessionPersistedObjectAnalyzer<T>

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.

See Also:
ImmutableSessionPersistedObject, OptimizedSessionPersistedObject

Method Summary
 boolean checkAndResetDirtyState(T sessionPersistedObject)
          Atomically check and reset the dirty state of the session persisted object.

Method Detail


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.

sessionPersistedObject - the session attribute (never null)
true if the object needs to be re-stored into the session

Copyright © 2003-2012 The Apache Software Foundation.