OptimisticCacheSource (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.cache.spi
Interface OptimisticCacheSource

All Known Subinterfaces:
  EntityPersister, Loadable, Lockable, OuterJoinLoadable, PostInsertIdentityPersister, Queryable, SQLLoadable, UniqueKeyLoadable

All Known Implementing Classes:
  AbstractEntityPersister, JoinedSubclassEntityPersister, 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.

Method Summary
`Comparator` | `getVersionComparator()` Get the comparator used to compare two different version values.
`boolean` | `isVersioned()` Is the data to be cached considered versioned? If true, it is illegal for `getVersionComparator()` to return null.

Method Detail

### isVersioned

    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.

### getVersionComparator

    Comparator getVersionComparator()

  Get the comparator used to compare two different version values.

  May return null if `isVersioned()` returns false.

  Returns:
    Comparator used to compare two different version values.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.