Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5
Class BaseOptimizedSessionPersistedObject

    java.lang.Object
      org.apache.tapestry5.BaseOptimizedSessionPersistedObject

All Implemented Interfaces:
  OptimizedSessionPersistedObject

Direct Known Subclasses:
  DefaultTreeExpansionModel, DefaultTreeSelectionModel, ValidationTrackerImpl

    public abstract class BaseOptimizedSessionPersistedObject

extends java.lang.Object
implements OptimizedSessionPersistedObject

Base implementation of `OptimizedSessionPersistedObject`. Subclasses should invoke `markDirty()` after the internal state of the object changes.

Due to the concurrent nature of session attributes it's important that markDirty occurs after the object has been changed. If the change occurs before the object has been mutated it's possible that another thread may re-store the object before the changes are actually made!

Since:
  5.1.1.0

Constructor Summary
`BaseOptimizedSessionPersistedObject()`

Method Summary
`boolean` | `checkAndResetDirtyMarker()`
`protected void` | `markDirty()` Invoked by the subclass after internal state of the object changes.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BaseOptimizedSessionPersistedObject

    public BaseOptimizedSessionPersistedObject()

Method Detail

### checkAndResetDirtyMarker

    public final boolean checkAndResetDirtyMarker()

  Specified by:
    `checkAndResetDirtyMarker` in interface `OptimizedSessionPersistedObject`
  Returns:
    true if the object has in-memory changes since the last time this method was called.

### markDirty

    protected final void markDirty()

  Invoked by the subclass after internal state of the object changes.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.