Package org.hibernate.cache
Interface OptimisticCacheSource
- All Known Subinterfaces:
EntityPersister,Loadable,Lockable,OuterJoinLoadable,PostInsertIdentityPersister,Queryable,SQLLoadable,UniqueKeyLoadable
- All Known Implementing Classes:
AbstractEntityPersister,JoinedSubclassEntityPersister,OptimisticCacheSourceAdapter,SingleTableEntityPersister,UnionSubclassEntityPersister
public interface OptimisticCacheSource
Contract for sources of optimistically lockable data sent to the second level
cache.
Note currently
EntityPersisters are
the only viable source.-
Method Summary
Modifier and TypeMethodDescriptionGet the comparator used to compare two different version values.booleanIs the data to be cached considered versioned?
-
Method Details
-
isVersioned
boolean isVersioned()Is the data to be cached considered versioned? If true, it is illegal forgetVersionComparator()to return null.- Returns:
- True if the data is versioned; false otherwise.
-
getVersionComparator
Comparator getVersionComparator()Get the comparator used to compare two different version values. May return null ifisVersioned()returns false.- Returns:
-