/** * Update TTL if it is changed. * * @param expiryPlc Expiry policy. */ private void updateTtl(ExpiryPolicy expiryPlc) throws IgniteCheckedException, GridCacheEntryRemovedException { long ttl = CU.toTtl(expiryPlc.getExpiryForAccess()); if (ttl != CU.TTL_NOT_CHANGED) updateTtl(ttl); }
/** {@inheritDoc} */ @Override public void updateTtl(@Nullable GridCacheVersion ver, long ttl) throws GridCacheEntryRemovedException { lockEntry(); try { checkObsolete(); if (hasValueUnlocked()) { try { updateTtl(ttl); } catch (IgniteCheckedException e) { U.error(log, "Failed to update TTL: " + e, e); } } /* TODO IGNITE-305. try { if (var == null || ver.equals(version())) updateTtl(ttl); } catch (GridCacheEntryRemovedException ignored) { // No-op. } */ } finally { unlockEntry(); } }
/** * Update TTL is it is changed. * * @param expiryPlc Expiry policy. * @throws GridCacheEntryRemovedException If failed. */ private void updateTtl(IgniteCacheExpiryPolicy expiryPlc) throws GridCacheEntryRemovedException, IgniteCheckedException { long ttl = expiryPlc.forAccess(); if (ttl != CU.TTL_NOT_CHANGED) { updateTtl(ttl); expiryPlc.ttlUpdated(key(), version(), hasReaders() ? ((GridDhtCacheEntry)this).readers() : null); } }
updateTtl(expiryPlc);
updateTtl(expiryPlc);
/** * Update TTL if it is changed. * * @param expiryPlc Expiry policy. */ private void updateTtl(ExpiryPolicy expiryPlc) throws IgniteCheckedException, GridCacheEntryRemovedException { long ttl = CU.toTtl(expiryPlc.getExpiryForAccess()); if (ttl != CU.TTL_NOT_CHANGED) updateTtl(ttl); }
/** {@inheritDoc} */ @Override public void updateTtl(@Nullable GridCacheVersion ver, long ttl) throws GridCacheEntryRemovedException { lockEntry(); try { checkObsolete(); if (hasValueUnlocked()) { try { updateTtl(ttl); } catch (IgniteCheckedException e) { U.error(log, "Failed to update TTL: " + e, e); } } /* TODO IGNITE-305. try { if (var == null || ver.equals(version())) updateTtl(ttl); } catch (GridCacheEntryRemovedException ignored) { // No-op. } */ } finally { unlockEntry(); } }
/** * Update TTL is it is changed. * * @param expiryPlc Expiry policy. * @throws GridCacheEntryRemovedException If failed. */ private void updateTtl(IgniteCacheExpiryPolicy expiryPlc) throws GridCacheEntryRemovedException, IgniteCheckedException { long ttl = expiryPlc.forAccess(); if (ttl != CU.TTL_NOT_CHANGED) { updateTtl(ttl); expiryPlc.ttlUpdated(key(), version(), hasReaders() ? ((GridDhtCacheEntry)this).readers() : null); } }
updateTtl(expiryPlc);
updateTtl(expiryPlc);