com.hazelcast.hibernate.region
Class AbstractTransactionalDataRegion<Cache extends RegionCache>

java.lang.Object
  extended by com.hazelcast.hibernate.region.AbstractTransactionalDataRegion<Cache>
Type Parameters:
Cache - implementation type of RegionCache
All Implemented Interfaces:
HazelcastRegion<Cache>
Direct Known Subclasses:
HazelcastCollectionRegion, HazelcastEntityRegion, HazelcastNaturalIdRegion

public abstract class AbstractTransactionalDataRegion<Cache extends RegionCache>
extends Object

Abstract base class of all regions

Author:
Leo Kim (lkim@limewire.com)

Field Summary
protected  Properties props
           
 
Constructor Summary
protected AbstractTransactionalDataRegion(HazelcastInstance instance, String regionName, Properties props, CacheDataDescription metadata, Cache cache)
           
 
Method Summary
 boolean contains(Object key)
           
 void destroy()
           
 Cache getCache()
           
 CacheDataDescription getCacheDataDescription()
           
 long getElementCountInMemory()
           
 long getElementCountOnDisk()
          Hazelcast does not support pushing elements to disk.
 HazelcastInstance getInstance()
           
 ILogger getLogger()
           
 String getName()
           
 long getSizeInMemory()
           
 int getTimeout()
           
 boolean isTransactionAware()
           
 long nextTimestamp()
           
 Map toMap()
          Appears to be used only by org.hibernate.stat.SecondLevelCacheStatistics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

protected final Properties props
Constructor Detail

AbstractTransactionalDataRegion

protected AbstractTransactionalDataRegion(HazelcastInstance instance,
                                          String regionName,
                                          Properties props,
                                          CacheDataDescription metadata,
                                          Cache cache)
Method Detail

getCacheDataDescription

public CacheDataDescription getCacheDataDescription()
See Also:
org.hibernate.cache.TransactionalDataRegion#getCacheDataDescription()

isTransactionAware

public boolean isTransactionAware()
See Also:
org.hibernate.cache.TransactionalDataRegion#isTransactionAware()

getCache

public Cache getCache()

destroy

public void destroy()
             throws org.hibernate.cache.CacheException
Throws:
org.hibernate.cache.CacheException

getElementCountInMemory

public long getElementCountInMemory()
Returns:
The size of the internal IMap.

getElementCountOnDisk

public long getElementCountOnDisk()
Hazelcast does not support pushing elements to disk.

Returns:
-1 this value means "unsupported"

getName

public String getName()
Returns:
The name of the region.

getSizeInMemory

public long getSizeInMemory()
Returns:
a rough estimate of number of bytes used by this region.

getTimeout

public final int getTimeout()

nextTimestamp

public final long nextTimestamp()

toMap

public Map toMap()
Appears to be used only by org.hibernate.stat.SecondLevelCacheStatistics.

Returns:
the internal IMap used for this region.

contains

public boolean contains(Object key)

getInstance

public final HazelcastInstance getInstance()
Specified by:
getInstance in interface HazelcastRegion<Cache extends RegionCache>

getLogger

public final ILogger getLogger()
Specified by:
getLogger in interface HazelcastRegion<Cache extends RegionCache>


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