Class ClusteredTimestampsRegionImpl
- java.lang.Object
-
- org.infinispan.hibernate.cache.v53.impl.TimestampsRegionImpl
-
- org.infinispan.hibernate.cache.v53.impl.ClusteredTimestampsRegionImpl
-
- All Implemented Interfaces:
org.hibernate.cache.spi.DirectAccessRegion
,org.hibernate.cache.spi.ExtendedStatisticsSupport
,org.hibernate.cache.spi.Region
,org.hibernate.cache.spi.TimestampsRegion
,org.infinispan.hibernate.cache.commons.InfinispanBaseRegion
,org.infinispan.hibernate.cache.commons.TimeSource
public class ClusteredTimestampsRegionImpl extends TimestampsRegionImpl
-
-
Constructor Summary
Constructors Constructor Description ClusteredTimestampsRegionImpl(org.infinispan.AdvancedCache cache, String name, InfinispanRegionFactory factory)
Clustered timestamps region constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginInvalidation()
boolean
checkValid()
Checks if the region is valid for operations such as storing new data in the region, or retrieving data from the region.void
clear()
void
destroy()
void
endInvalidation()
org.infinispan.AdvancedCache
getCache()
long
getElementCountInMemory()
long
getElementCountOnDisk()
Object
getFromCache(Object key, org.hibernate.engine.spi.SharedSessionContractImplementor session)
long
getLastRegionInvalidation()
String
getName()
InfinispanRegionFactory
getRegionFactory()
long
getSizeInMemory()
protected org.infinispan.AdvancedCache
getTimestampsPutCache(org.infinispan.AdvancedCache cache)
void
invalidateRegion()
long
nextTimestamp()
void
nodeModified(org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent event)
Monitors cache events and updates the local cachevoid
nodeRemoved(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent event)
Monitors cache events and updates the local cachevoid
putIntoCache(Object key, Object value, org.hibernate.engine.spi.SharedSessionContractImplementor session)
protected void
runInvalidation()
-
-
-
Constructor Detail
-
ClusteredTimestampsRegionImpl
public ClusteredTimestampsRegionImpl(org.infinispan.AdvancedCache cache, String name, InfinispanRegionFactory factory)
Clustered timestamps region constructor.- Parameters:
cache
- instance to store update timestampsname
- of the update timestamps regionfactory
- for the update timestamps region
-
-
Method Detail
-
getTimestampsPutCache
protected org.infinispan.AdvancedCache getTimestampsPutCache(org.infinispan.AdvancedCache cache)
- Overrides:
getTimestampsPutCache
in classTimestampsRegionImpl
-
getFromCache
public Object getFromCache(Object key, org.hibernate.engine.spi.SharedSessionContractImplementor session)
- Specified by:
getFromCache
in interfaceorg.hibernate.cache.spi.DirectAccessRegion
- Overrides:
getFromCache
in classTimestampsRegionImpl
-
putIntoCache
public void putIntoCache(Object key, Object value, org.hibernate.engine.spi.SharedSessionContractImplementor session)
- Specified by:
putIntoCache
in interfaceorg.hibernate.cache.spi.DirectAccessRegion
- Overrides:
putIntoCache
in classTimestampsRegionImpl
-
invalidateRegion
public void invalidateRegion()
-
destroy
public void destroy() throws org.hibernate.cache.CacheException
- Specified by:
destroy
in interfaceorg.infinispan.hibernate.cache.commons.InfinispanBaseRegion
- Specified by:
destroy
in interfaceorg.hibernate.cache.spi.Region
- Throws:
org.hibernate.cache.CacheException
-
nodeModified
public void nodeModified(org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent event)
Monitors cache events and updates the local cache- Parameters:
event
- The event
-
nodeRemoved
public void nodeRemoved(org.infinispan.notifications.cachelistener.event.CacheEntryRemovedEvent event)
Monitors cache events and updates the local cache- Parameters:
event
- The event
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.infinispan.hibernate.cache.commons.InfinispanBaseRegion
- Specified by:
getName
in interfaceorg.hibernate.cache.spi.Region
-
nextTimestamp
public long nextTimestamp()
- Specified by:
nextTimestamp
in interfaceorg.infinispan.hibernate.cache.commons.TimeSource
-
checkValid
public boolean checkValid()
Checks if the region is valid for operations such as storing new data in the region, or retrieving data from the region.- Specified by:
checkValid
in interfaceorg.infinispan.hibernate.cache.commons.InfinispanBaseRegion
- Returns:
- true if the region is valid, false otherwise
-
clear
public void clear()
- Specified by:
clear
in interfaceorg.hibernate.cache.spi.Region
-
beginInvalidation
public void beginInvalidation()
- Specified by:
beginInvalidation
in interfaceorg.infinispan.hibernate.cache.commons.InfinispanBaseRegion
-
endInvalidation
public void endInvalidation()
- Specified by:
endInvalidation
in interfaceorg.infinispan.hibernate.cache.commons.InfinispanBaseRegion
-
getLastRegionInvalidation
public long getLastRegionInvalidation()
- Specified by:
getLastRegionInvalidation
in interfaceorg.infinispan.hibernate.cache.commons.InfinispanBaseRegion
-
getCache
public org.infinispan.AdvancedCache getCache()
- Specified by:
getCache
in interfaceorg.infinispan.hibernate.cache.commons.InfinispanBaseRegion
-
runInvalidation
protected void runInvalidation()
-
getRegionFactory
public InfinispanRegionFactory getRegionFactory()
- Specified by:
getRegionFactory
in interfaceorg.hibernate.cache.spi.Region
-
getElementCountInMemory
public long getElementCountInMemory()
- Specified by:
getElementCountInMemory
in interfaceorg.hibernate.cache.spi.ExtendedStatisticsSupport
- Specified by:
getElementCountInMemory
in interfaceorg.infinispan.hibernate.cache.commons.InfinispanBaseRegion
-
getElementCountOnDisk
public long getElementCountOnDisk()
- Specified by:
getElementCountOnDisk
in interfaceorg.hibernate.cache.spi.ExtendedStatisticsSupport
-
getSizeInMemory
public long getSizeInMemory()
- Specified by:
getSizeInMemory
in interfaceorg.hibernate.cache.spi.ExtendedStatisticsSupport
-
-