Top Description Fields Constructors Methods
org.hibernate.cache.impl.bridge

public Class OptimisticCacheSourceAdapter

extends Object
implements OptimisticCacheSource
Class Inheritance
All Implemented Interfaces
org.hibernate.cache.OptimisticCacheSource
Imports
java.util.Comparator, org.hibernate.cache.OptimisticCacheSource, .CacheDataDescription

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

Note currently org.hibernate.persister.entity.EntityPersisters are the only viable source.

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final CacheDataDescription

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Comparator<T>
getVersionComparator()

Implements org.hibernate.cache.OptimisticCacheSource.getVersionComparator.

Get the comparator used to compare two different version values.
public boolean
isVersioned()

Implements org.hibernate.cache.OptimisticCacheSource.isVersioned.

Is the data to be cached considered versioned?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dataDescriptionback to summary
private final CacheDataDescription dataDescription

Constructor Detail

OptimisticCacheSourceAdapterback to summary
public OptimisticCacheSourceAdapter(CacheDataDescription dataDescription)

Method Detail

getVersionComparatorback to summary
public Comparator<T> getVersionComparator()

Implements org.hibernate.cache.OptimisticCacheSource.getVersionComparator.

Doc from org.hibernate.cache.OptimisticCacheSource.getVersionComparator.

Get the comparator used to compare two different version values.

May return null if isVersioned() returns false.

isVersionedback to summary
public boolean isVersioned()

Implements org.hibernate.cache.OptimisticCacheSource.isVersioned.

Doc from org.hibernate.cache.OptimisticCacheSource.isVersioned.

Is the data to be cached considered versioned?

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

Returns:boolean

True if the data is versioned; false otherwise.