- Common ways to obtain EntityRegionAccessStrategy
private void myMethod () {EntityRegionAccessStrategy e =
EhcacheEntityRegion ehcacheEntityRegion;EhcacheEntityRegion region;new ReadWriteEhcacheEntityRegionAccessStrategy(ehcacheEntityRegion, region.getSettings())
EhcacheEntityRegion ehcacheEntityRegion;EhcacheEntityRegion ehcacheEntityRegion2;new NonStrictReadWriteEhcacheEntityRegionAccessStrategy(ehcacheEntityRegion, ehcacheEntityRegion2.getSettings())
EhcacheEntityRegion ehcacheEntityRegion;EhcacheEntityRegion region;new ReadOnlyEhcacheEntityRegionAccessStrategy(ehcacheEntityRegion, region.getSettings())
- Smart code suggestions by Codota
}
/** * {@inheritDoc} * * @see org.hibernate.cache.access.EntityRegionAccessStrategy#get(java.lang.Object, long) */ public Object get(Object key, long txTimestamp) throws CacheException { try { return actualStrategy.get(key, txTimestamp); } catch (NonStopCacheException nonStopCacheException) { hibernateNonstopExceptionHandler.handleNonstopCacheException(nonStopCacheException); return null; } }
/** * {@inheritDoc} * * @see org.hibernate.cache.access.EntityRegionAccessStrategy#get(java.lang.Object, long) */ public Object get(Object key, long txTimestamp) throws CacheException { try { return actualStrategy.get(key, txTimestamp); } catch (NonStopCacheException nonStopCacheException) { hibernateNonstopExceptionHandler.handleNonstopCacheException(nonStopCacheException); return null; } }
/** * {@inheritDoc} * * @see org.hibernate.cache.access.EntityRegionAccessStrategy#get(java.lang.Object, long) */ public Object get(Object key, long txTimestamp) throws CacheException { try { return actualStrategy.get(key, txTimestamp); } catch (NonStopCacheException nonStopCacheException) { hibernateNonstopExceptionHandler.handleNonstopCacheException(nonStopCacheException); return null; } }
/** * {@inheritDoc} * * @see org.hibernate.cache.access.EntityRegionAccessStrategy#get(java.lang.Object, long) */ public Object get(Object key, long txTimestamp) throws CacheException { try { return actualStrategy.get(key, txTimestamp); } catch (NonStopCacheException nonStopCacheException) { hibernateNonstopExceptionHandler.handleNonstopCacheException(nonStopCacheException); return null; } }
public CacheEntry<T> assertIsMissing() { CacheKey cacheKey = getCacheKey(); Object entry = cacheAccess.get(cacheKey, cacheRegion.nextTimestamp()); Assert.assertNull(cacheKey + " should not be in cache region " + cacheRegion.getName() + ", yet return value", entry); return this; }
public CacheEntry<T> assertIsPresent() { CacheKey cacheKey = getCacheKey(); Object entry = cacheAccess.get(cacheKey, cacheRegion.nextTimestamp()); Assert.assertNotNull(cacheKey + " should be in cache region " + cacheRegion.getName() + ", yet return value", entry); return this; }