/** {@inheritDoc} */ @Override public boolean updateExpiration(@Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String key, @Nullable final Long expiration) throws IOException { try { return updateImpl(null, context, key, null, expiration) != null; } catch (VersionMismatchException e) { throw new IOException("Unexpected exception thrown by update.", e); } }
/** {@inheritDoc} */ @Override @Nullable protected Long updateImpl(@Nullable final Long version, @Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String key, @Nullable final String value, @Nullable final Long expiration) throws IOException, VersionMismatchException { final Long i = super.updateImpl(version, context, key, value, expiration); if (i != null) { setDirty(true); } return i; }
/** {@inheritDoc} */ @Override @Nullable public Long updateWithVersion(final long version, @Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String key, @Nonnull @NotEmpty final String value, @Nullable final Long expiration) throws IOException, VersionMismatchException { return updateImpl(version, context, key, value, expiration); }
/** {@inheritDoc} */ @Override public boolean update(@Nonnull @NotEmpty final String context, @Nonnull @NotEmpty final String key, @Nonnull @NotEmpty final String value, @Nullable final Long expiration) throws IOException { try { return updateImpl(null, context, key, value, expiration) != null; } catch (VersionMismatchException e) { throw new IOException("Unexpected exception thrown by update.", e); } }