@Override public void unlockItem(Object key, SoftLock lock) throws CacheException { evict(key); }
@Override public boolean update(SharedSessionContractImplementor session, Object key, Object value) throws CacheException { remove(session, key); return false; }
@Override public boolean afterUpdate(SharedSessionContractImplementor session, Object key, Object value, SoftLock lock) throws CacheException { unlockItem(session, key, lock); return false; }
@Override public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException { if (accessType == AccessType.READ_ONLY) { return new ReadOnlyNaturalIdRegionAccessStrategy(settings, this); } if (accessType == AccessType.READ_WRITE) { return new ReadWriteNaturalIdRegionAccessStrategy(settings, this, mapCache); } if (accessType == AccessType.NONSTRICT_READ_WRITE) { return new NonStrictReadWriteNaturalIdRegionAccessStrategy(settings, this); } if (accessType == AccessType.TRANSACTIONAL) { return new TransactionalNaturalIdRegionAccessStrategy(settings, this); } throw new CacheException("Unsupported access strategy: " + accessType); }
@Override public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException { if (accessType == AccessType.READ_ONLY) { return new ReadOnlyNaturalIdRegionAccessStrategy(settings, this); } if (accessType == AccessType.READ_WRITE) { return new ReadWriteNaturalIdRegionAccessStrategy(settings, this, mapCache); } if (accessType == AccessType.NONSTRICT_READ_WRITE) { return new NonStrictReadWriteNaturalIdRegionAccessStrategy(settings, this); } if (accessType == AccessType.TRANSACTIONAL) { return new TransactionalNaturalIdRegionAccessStrategy(settings, this); } throw new CacheException("Unsupported access strategy: " + accessType); }
@Override public boolean afterUpdate(Object key, Object value, SoftLock lock) throws CacheException { unlockItem(key, lock); return false; }
@Override public boolean update(SessionImplementor session, Object key, Object value) throws CacheException { remove(session, key); return false; }
@Override public void unlockItem(SessionImplementor session, Object key, SoftLock lock) throws CacheException { evict(key); }
@Override public NaturalIdRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException { if (accessType == AccessType.READ_ONLY) { return new ReadOnlyNaturalIdRegionAccessStrategy(settings, this); } if (accessType == AccessType.READ_WRITE) { return new ReadWriteNaturalIdRegionAccessStrategy(settings, this, mapCache); } if (accessType == AccessType.NONSTRICT_READ_WRITE) { return new NonStrictReadWriteNaturalIdRegionAccessStrategy(settings, this); } if (accessType == AccessType.TRANSACTIONAL) { return new TransactionalNaturalIdRegionAccessStrategy(settings, this); } throw new CacheException("Unsupported access strategy: " + accessType); }
@Override public boolean afterUpdate(SessionImplementor session, Object key, Object value, SoftLock lock) throws CacheException { unlockItem(session, key, lock); return false; }
@Override public boolean update(Object key, Object value) throws CacheException { remove(key); return false; }
@Override public void unlockItem(SharedSessionContractImplementor session, Object key, SoftLock lock) throws CacheException { evict(key); }