com.hazelcast.hibernate.distributed
Class IMapRegionCache

java.lang.Object
  extended by com.hazelcast.hibernate.distributed.IMapRegionCache
All Implemented Interfaces:
RegionCache

public class IMapRegionCache
extends Object
implements RegionCache

A RegionCache implementation based on the underlying IMap


Constructor Summary
IMapRegionCache(String name, HazelcastInstance hazelcastInstance, Properties props, CacheDataDescription metadata)
           
 
Method Summary
 Map asMap()
           
 void clear()
           
 boolean contains(Object key)
           
 Object get(Object key)
           
 long getSizeInMemory()
           
 boolean put(Object key, Object value, Object currentVersion)
           
 boolean remove(Object key)
           
 long size()
           
 SoftLock tryLock(Object key, Object version)
           
 void unlock(Object key, SoftLock lock)
           
 boolean update(Object key, Object value, Object currentVersion, Object previousVersion, SoftLock lock)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMapRegionCache

public IMapRegionCache(String name,
                       HazelcastInstance hazelcastInstance,
                       Properties props,
                       CacheDataDescription metadata)
Method Detail

get

public Object get(Object key)
Specified by:
get in interface RegionCache

put

public boolean put(Object key,
                   Object value,
                   Object currentVersion)
Specified by:
put in interface RegionCache

update

public boolean update(Object key,
                      Object value,
                      Object currentVersion,
                      Object previousVersion,
                      SoftLock lock)
Specified by:
update in interface RegionCache

remove

public boolean remove(Object key)
Specified by:
remove in interface RegionCache

tryLock

public SoftLock tryLock(Object key,
                        Object version)
Specified by:
tryLock in interface RegionCache

unlock

public void unlock(Object key,
                   SoftLock lock)
Specified by:
unlock in interface RegionCache

contains

public boolean contains(Object key)
Specified by:
contains in interface RegionCache

clear

public void clear()
Specified by:
clear in interface RegionCache

size

public long size()
Specified by:
size in interface RegionCache

getSizeInMemory

public long getSizeInMemory()
Specified by:
getSizeInMemory in interface RegionCache

asMap

public Map asMap()
Specified by:
asMap in interface RegionCache


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.