Class ReadWriteCache

java.lang.Object
org.hibernate.cache.ReadWriteCache
All Implemented Interfaces:
CacheConcurrencyStrategy

public class ReadWriteCache extends Object implements CacheConcurrencyStrategy
Caches data that is sometimes updated while maintaining the semantics of "read committed" isolation level. If the database is set to "repeatable read", this concurrency strategy almost maintains the semantics. Repeatable read isolation is compromised in the case of concurrent writes. This is an "asynchronous" concurrency strategy.

If this strategy is used in a cluster, the underlying cache implementation must support distributed hard locks (which are held only momentarily). This strategy also assumes that the underlying cache implementation does not do asynchronous replication and that state has been fully replicated as soon as the lock is released.
See Also:
  • Constructor Details

    • ReadWriteCache

      public ReadWriteCache()
  • Method Details