Skip to content

Commit

Permalink
moving out of place method
Browse files Browse the repository at this point in the history
  • Loading branch information
TJ Zhang committed May 27, 2024
1 parent a52a58e commit 05a75f0
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions java/client/src/main/java/glide/api/models/BaseTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,22 @@ public T set(@NonNull String key, @NonNull String value, @NonNull SetOptions opt
return getThis();
}

/**
* Appends a <code>value</code> to a <code>key</code>. If <code>key</code> does not exist it is
* created and set as an empty string, so <code>APPEND</code> will be similar to {@see #set} in
* this special case.
*
* @see <a href="https://redis.io/docs/latest/commands/append/">redis.io</a> for details.
* @param key The key of the string.
* @param value The value to append.
* @return Command Response - The length of the string after appending the value.
*/
public T append(@NonNull String key, @NonNull String value) {
ArgsArray commandArgs = buildArgs(key, value);
protobufTransaction.addCommands(buildCommand(Append, commandArgs));
return getThis();
}

/**
* Retrieves the values of multiple <code>keys</code>.
*
Expand Down Expand Up @@ -3743,20 +3759,4 @@ protected ArgsArray buildArgs(String... stringArgs) {

return commandArgs.build();
}

/**
* Appends a <code>value</code> to a <code>key</code>. If <code>key</code> does not exist it is
* created and set as an empty string, so <code>APPEND</code> will be similar to {@see #set} in
* this special case.
*
* @see <a href="https://redis.io/docs/latest/commands/append/">redis.io</a> for details.
* @param key The key of the string.
* @param value The value to append.
* @return Command Response - The length of the string after appending the value.
*/
public T append(@NonNull String key, @NonNull String value) {
ArgsArray commandArgs = buildArgs(key, value);
protobufTransaction.addCommands(buildCommand(Append, commandArgs));
return getThis();
}
}

0 comments on commit 05a75f0

Please sign in to comment.