Skip to content

Commit

Permalink
current progress
Browse files Browse the repository at this point in the history
  • Loading branch information
cyip10 committed Jul 3, 2024
1 parent 1d8d6c8 commit 93273df
Showing 1 changed file with 72 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
*/
public interface StreamBaseCommands {

/** Redis API keyword used to change the reply to return an array of IDs. */
String JUSTID_FOR_STREAM_REDIS_API = "JUSTID";

/**
* Adds an entry to the specified stream stored at <code>key</code>.<br>
* If the <code>key</code> doesn't exist, the stream is created.
Expand Down Expand Up @@ -1039,4 +1042,73 @@ CompletableFuture<String[]> xclaimJustId(
long minIdleTime,
String[] ids,
StreamClaimOptions options);

/**
* Transfers ownership of pending stream entries that match the specified criteria.
*
* @see <a href ="https://valkey.io/commands/xautoclaim">valkey.io</a> for details.
* @param key The key of the stream.
* @param group The consumer group name
* @param consumer The group consumer.
* @param minIdleTime The minimum idle time for the message to be claimed.
* @param start Filters the claimed entries to those that have an ID equal or greater than the specified value.
*/
CompletableFuture<Object[]> xautoclaim(
String key, String group, String consumer, long minIdleTime, String start);

/**
* Transfers ownership of pending stream entries that match the specified criteria.
*
* @see <a href ="https://valkey.io/commands/xautoclaim">valkey.io</a> for details.
* @param key The key of the stream.
* @param group The consumer group name
* @param consumer The group consumer.
* @param minIdleTime The minimum idle time for the message to be claimed.
* @param start Filters the claimed entries to those that have an ID equal or greater than the specified value.
* @param count Limits the number of claimed entries to the specified value.
*/
CompletableFuture<Object[]> xautoclaim(
String key, String group, String consumer, long minIdleTime, String start, long count);

/**
* Transfers ownership of pending stream entries that match the specified criteria. This command
* uses the JUSTID argument to further specify that the return value should contain a list of
* claimed IDs without their field-value info.
*
* @see <a href ="https://valkey.io/commands/xautoclaim">valkey.io</a> for details.
* @param key The key of the stream.
* @param group The consumer group name
* @param consumer The group consumer.
* @param minIdleTime The minimum idle time for the message to be claimed.
* @param start Filters the claimed entries to those that have an ID equal or greater than the specified value.
*/
CompletableFuture<Object[]> xautoclaimJustId(
String key,
String group,
String consumer,
long minIdleTime,
String start,
String JUSTID_FOR_STREAM_REDIS_API);

/**
* Transfers ownership of pending stream entries that match the specified criteria. This command
* uses the JUSTID argument to further specify that the return value should contain a list of
* claimed IDs without their field-value info.
*
* @see <a href ="https://valkey.io/commands/xautoclaim">valkey.io</a> for details.
* @param key The key of the stream.
* @param group The consumer group name
* @param consumer The group consumer.
* @param minIdleTime The minimum idle time for the message to be claimed.
* @param start Filters the claimed entries to those that have an ID equal or greater than the specified value.
* @param count Limits the number of claimed entries to the specified value.
*/
CompletableFuture<Object[]> xuatoclaimJustId(
String key,
String group,
String consumer,
long minIdleTime,
String start,
long count,
String JUSTID_FOR_STREAM_REDIS_API);
}

0 comments on commit 93273df

Please sign in to comment.