Example usage for org.hibernate.cache.spi.entry StructuredCacheEntry VERSION_KEY

List of usage examples for org.hibernate.cache.spi.entry StructuredCacheEntry VERSION_KEY

Introduction

In this page you can find the example usage for org.hibernate.cache.spi.entry StructuredCacheEntry VERSION_KEY.

Prototype

String VERSION_KEY

To view the source code for org.hibernate.cache.spi.entry StructuredCacheEntry VERSION_KEY.

Click Source Link

Usage

From source file:org.infinispan.hibernate.cache.commons.util.VersionedEntry.java

License:LGPL

private Object findVersion(Object entry) {
    if (entry instanceof CacheEntry) {
        // with UnstructuredCacheEntry
        return ((CacheEntry) entry).getVersion();
    } else if (entry instanceof Map) {
        return ((Map) entry).get(StructuredCacheEntry.VERSION_KEY);
    } else {/*from   w  ww.j  a  v a 2  s  . co  m*/
        return null;
    }
}