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
Class OptimisticTreeCache.DataVersionAdapter

    java.lang.Object
      org.hibernate.cache.OptimisticTreeCache.DataVersionAdapter

All Implemented Interfaces:
  Serializable, org.jboss.cache.optimistic.DataVersion

Enclosing class:
  OptimisticTreeCache

    public static class OptimisticTreeCache.DataVersionAdapter

extends Object
implements org.jboss.cache.optimistic.DataVersion

See Also:
  Serialized Form

Constructor Summary
`OptimisticTreeCache.DataVersionAdapter(Object currentVersion, Object previousVersion, Comparator versionComparator, String sourceIdentifer)`

Method Summary
`boolean` | `newerThan(org.jboss.cache.optimistic.DataVersion dataVersion)` newerThan() call is dispatched against the DataVersion currently associated with the node; the passed dataVersion param is the DataVersion associated with the data we are trying to put into the node.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### OptimisticTreeCache.DataVersionAdapter

    public OptimisticTreeCache.DataVersionAdapter(Object currentVersion,
                                                  Object previousVersion,
                                                  Comparator versionComparator,
                                                  String sourceIdentifer)

Method Detail

### newerThan

    public boolean newerThan(org.jboss.cache.optimistic.DataVersion dataVersion)

  newerThan() call is dispatched against the DataVersion currently associated with the node; the passed dataVersion param is the DataVersion associated with the data we are trying to put into the node.

  we are expected to return true in the case where we (the current node DataVersion) are newer that then incoming value. Returning true here essentially means that a optimistic lock failure has occured (because conversely, the value we are trying to put into the node is "older than" the value already there...)

  Specified by:
    `newerThan` in interface `org.jboss.cache.optimistic.DataVersion`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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