The dirty status of a ClusteredSession's attributes and meta-data should be tracked separately. The meta-data should only be replicated if made dirty. Changing the accessed time does not make the meta-data dirty.
This will allow much less frequent replication of the meta-data. Particularly useful in the case of ATTRIBUTE and FIELD granularity.
The internal isOutdated member should be changed to a long. An outdated check consists of comparing the long to the lastAccessedTime. If the outdated field is later than the lastAccessedTime, the session is outdated. setOutdated(true) sets the outdated member to System.currentTimeMillis(); setOutdated(false) sets it to 0.
For 5.0.0, the behavior of SessionBasedClusteredSession can be changed as well. In writeExternal, we will write a boolean indicating whether the metadata is included. Cannot do this in 4.0.x because this will break serializable compatibility.