Skip to content

Commit

Permalink
Introduce Hash Field Expiration to the Spring Data Redis framework
Browse files Browse the repository at this point in the history
Signed-off-by: Tihomir Mateev <[email protected]>
  • Loading branch information
tishun committed Jan 21, 2025
1 parent 1e40558 commit 5b987c3
Show file tree
Hide file tree
Showing 22 changed files with 2,052 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

VERSION?=7.2.5
VERSION?=7.4.0
PROJECT?=redis
GH_ORG?=redis
SPRING_PROFILE?=ci
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2566,6 +2566,76 @@ public Long hStrLen(byte[] key, byte[] field) {
return convertAndReturn(delegate.hStrLen(key, field), Converters.identityConverter());
}

@Override
public List<Long> hExpire(byte[] key, long seconds, byte[]... fields) {
return this.delegate.hExpire(key, seconds, fields);
}

@Override
public List<Long> hpExpire(byte[] key, long millis, byte[]... fields) {
return this.delegate.hpExpire(key, millis, fields);
}

@Override
public List<Long> hExpireAt(byte[] key, long unixTime, byte[]... fields) {
return this.delegate.hExpireAt(key, unixTime, fields);
}

@Override
public List<Long> hpExpireAt(byte[] key, long unixTimeInMillis, byte[]... fields) {
return this.delegate.hpExpireAt(key, unixTimeInMillis, fields);
}

@Override
public List<Long> hPersist(byte[] key, byte[]... fields) {
return this.delegate.hPersist(key, fields);
}

@Override
public List<Long> hTtl(byte[] key, byte[]... fields) {
return this.delegate.hTtl(key, fields);
}

@Override
public List<Long> hTtl(byte[] key, TimeUnit timeUnit, byte[]... fields) {
return this.delegate.hTtl(key, timeUnit, fields);
}

@Override
public List<Long> hExpire(String key, long seconds, String... fields) {
return hExpire(serialize(key), seconds, serializeMulti(fields));
}

@Override
public List<Long> hpExpire(String key, long millis, String... fields) {
return hpExpire(serialize(key), millis, serializeMulti(fields));
}

@Override
public List<Long> hExpireAt(String key, long unixTime, String... fields) {
return hExpireAt(serialize(key), unixTime, serializeMulti(fields));
}

@Override
public List<Long> hpExpireAt(String key, long unixTimeInMillis, String... fields) {
return hpExpireAt(serialize(key), unixTimeInMillis, serializeMulti(fields));
}

@Override
public List<Long> hPersist(String key, String... fields) {
return hPersist(serialize(key), serializeMulti(fields));
}

@Override
public List<Long> hTtl(String key, String... fields) {
return hTtl(serialize(key), serializeMulti(fields));
}

@Override
public List<Long> hTtl(String key, TimeUnit timeUnit, String... fields) {
return hTtl(serialize(key), timeUnit, serializeMulti(fields));
}

@Override
public void setClientName(byte[] name) {
this.delegate.setClientName(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
* @author ihaohong
* @author Dennis Neufeld
* @author Shyngys Sapraliyev
* @author Tihomir Mateev
* @since 2.0
*/
@Deprecated
Expand Down Expand Up @@ -1470,6 +1471,55 @@ default Long hStrLen(byte[] key, byte[] field) {
return hashCommands().hStrLen(key, field);
}

/** @deprecated in favor of {@link RedisConnection#hashCommands()}}. */
@Override
@Deprecated
default List<Long> hExpire(byte[] key, long seconds, byte[]... fields) {
return hashCommands().hExpire(key, seconds, fields);
}

/** @deprecated in favor of {@link RedisConnection#hashCommands()}}. */
@Override
@Deprecated
default List<Long> hpExpire(byte[] key, long millis, byte[]... fields) {
return hashCommands().hpExpire(key, millis, fields);
}

/** @deprecated in favor of {@link RedisConnection#hashCommands()}}. */
@Override
@Deprecated
default List<Long> hExpireAt(byte[] key, long unixTime, byte[]... fields) {
return hashCommands().hExpireAt(key, unixTime, fields);
}

/** @deprecated in favor of {@link RedisConnection#hashCommands()}}. */
@Override
@Deprecated
default List<Long> hpExpireAt(byte[] key, long unixTimeInMillis, byte[]... fields) {
return hashCommands().hpExpireAt(key, unixTimeInMillis, fields);
}

/** @deprecated in favor of {@link RedisConnection#hashCommands()}}. */
@Override
@Deprecated
default List<Long> hPersist(byte[] key, byte[]... fields) {
return hashCommands().hPersist(key, fields);
}

/** @deprecated in favor of {@link RedisConnection#hashCommands()}}. */
@Override
@Deprecated
default List<Long> hTtl(byte[] key, byte[]... fields) {
return hashCommands().hTtl(key, fields);
}

/** @deprecated in favor of {@link RedisConnection#hashCommands()}}. */
@Override
@Deprecated
default List<Long> hTtl(byte[] key, TimeUnit timeUnit, byte[]... fields) {
return hashCommands().hTtl(key, timeUnit, fields);
}

// GEO COMMANDS

/** @deprecated in favor of {@link RedisConnection#geoCommands()}}. */
Expand Down
Loading

0 comments on commit 5b987c3

Please sign in to comment.