org.hibernate.cache
Interface OptimisticCacheSource
- EntityPersister, Loadable, Lockable, OuterJoinLoadable, PostInsertIdentityPersister, Queryable, SQLLoadable, UniqueKeyLoadable
- AbstractEntityPersister, JoinedSubclassEntityPersister, OptimisticCacheSourceAdapter, SingleTableEntityPersister, UnionSubclassEntityPersister
public interface OptimisticCacheSource
Contract for sources of optimistically lockable data sent to the second level
cache.
Note currently
EntityPersister
s are
the only viable source.
getVersionComparator
public Comparator getVersionComparator()
Get the comparator used to compare two different version values.
May return null
if isVersioned()
returns false.
isVersioned
public boolean isVersioned()
Is the data to be cached considered versioned?
If true, it is illegal for
getVersionComparator()
to return
null.
- True if the data is versioned; false otherwise.