public interface

OptimisticCacheSource

org.hibernate.cache.OptimisticCacheSource
Known Indirect Subclasses

Class Overview

Contract for sources of optimistically lockable data sent to the second level cache.

Note currently EntityPersisters are the only viable source.

Summary

Public Methods
abstract Comparator getVersionComparator()
Get the comparator used to compare two different version values.
abstract boolean isVersioned()
Is the data to be cached considered versioned?

If true, it is illegal for getVersionComparator() to return null.

Public Methods

public abstract Comparator getVersionComparator ()

Get the comparator used to compare two different version values.

May return null if isVersioned() returns false.

public abstract boolean isVersioned ()

Is the data to be cached considered versioned?

If true, it is illegal for getVersionComparator() to return null.

Returns
  • True if the data is versioned; false otherwise.