@SuppressWarnings("WeakerAccess") protected void handleLockExpiry(SharedSessionContractImplementor session, Object key, Lockable lock) { SecondLevelCacheLogger.INSTANCE.softLockedCacheExpired( getRegion().getName(), key ); log.info( "Cached entry expired : " + key ); // create new lock that times out immediately long ts = getRegion().getRegionFactory().nextTimestamp() + getRegion().getRegionFactory().getTimeout(); SoftLockImpl newLock = new SoftLockImpl( ts, uuid, nextLockId.getAndIncrement(), null ); //newLock.unlock( ts ); newLock.unlock( ts - getRegion().getRegionFactory().getTimeout() ); getStorageAccess().putIntoCache( key, newLock, session ); }
@SuppressWarnings("WeakerAccess") protected void handleLockExpiry(SharedSessionContractImplementor session, Object key, Lockable lock) { SecondLevelCacheLogger.INSTANCE.softLockedCacheExpired( getRegion().getName(), key ); log.info( "Cached entry expired : " + key ); // create new lock that times out immediately long ts = getRegion().getRegionFactory().nextTimestamp() + getRegion().getRegionFactory().getTimeout(); SoftLockImpl newLock = new SoftLockImpl( ts, uuid, nextLockId.getAndIncrement(), null ); //newLock.unlock( ts ); newLock.unlock( ts - getRegion().getRegionFactory().getTimeout() ); getStorageAccess().putIntoCache( key, newLock, session ); }