public interface DatabasePipelineCommands
| Modifier and Type | Method and Description |
|---|---|
Response<java.lang.Boolean> |
copy(byte[] srcKey,
byte[] dstKey,
int db,
boolean replace)
Binary version of
COPY. |
Response<java.lang.Boolean> |
copy(java.lang.String srcKey,
java.lang.String dstKey,
int db,
boolean replace)
Copy the value stored at the source key to the destination key.
|
Response<java.lang.Long> |
dbSize()
Return the number of keys in the currently-selected database.
|
Response<java.lang.String> |
migrate(java.lang.String host,
int port,
byte[] key,
int destinationDB,
int timeout)
Binary version of
MIGRATE. |
Response<java.lang.String> |
migrate(java.lang.String host,
int port,
int destinationDB,
int timeout,
MigrateParams params,
byte[]... keys)
Binary version of {@link DatabasePipelineCommands#migrate(String, int, int, int, MigrateParams, String...)
|
Response<java.lang.String> |
migrate(java.lang.String host,
int port,
int destinationDB,
int timeout,
MigrateParams params,
java.lang.String... keys)
Migrate Command
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
Response<java.lang.String> |
migrate(java.lang.String host,
int port,
java.lang.String key,
int destinationDB,
int timeout)
Migrate Command
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
Response<java.lang.Long> |
move(byte[] key,
int dbIndex)
Binary version of
MOVE. |
Response<java.lang.Long> |
move(java.lang.String key,
int dbIndex)
Move the specified key from the currently selected DB to the specified destination DB.
|
Response<java.lang.String> |
select(int index)
Select the DB with having the specified zero-based numeric index.
|
Response<java.lang.String> |
swapDB(int index1,
int index2)
This command swaps two Redis databases, so that immediately all the clients connected to a
given database will see the data of the other database, and the other way around.
|
Response<java.lang.String> select(int index)
index - the index of dbResponse<java.lang.Long> dbSize()
Response<java.lang.String> swapDB(int index1, int index2)
index1 - index2 - Response<java.lang.Long> move(java.lang.String key, int dbIndex)
key - The specified keydbIndex - Specified destination databaseResponse<java.lang.Long> move(byte[] key, int dbIndex)
MOVE.DatabaseCommands.move(String, int)Response<java.lang.Boolean> copy(java.lang.String srcKey, java.lang.String dstKey, int db, boolean replace)
srcKey - The source key.dstKey - The destination key.db - Allows specifying an alternative logical database index for the destination key.replace - Removes the destination key before copying the value to it, in order to avoid error.Response<java.lang.Boolean> copy(byte[] srcKey, byte[] dstKey, int db, boolean replace)
COPY.copy(String, String, int, boolean)Response<java.lang.String> migrate(java.lang.String host, int port, byte[] key, int destinationDB, int timeout)
MIGRATE.migrate(String, int, String, int, int)Response<java.lang.String> migrate(java.lang.String host, int port, int destinationDB, int timeout, MigrateParams params, byte[]... keys)
MIGRATE.Response<java.lang.String> migrate(java.lang.String host, int port, java.lang.String key, int destinationDB, int timeout)
host - Target hostport - Target portkey - Migrate keydestinationDB - Target dbtimeout - The maximum idle time in any moment of the communication with the
destination instance in milliseconds.Response<java.lang.String> migrate(java.lang.String host, int port, int destinationDB, int timeout, MigrateParams params, java.lang.String... keys)
host - Target hostport - Target portdestinationDB - Target dbtimeout - The maximum idle time in any moment of the communication with the
destination instance in milliseconds.params - MigrateParamskeys - The keys to migrateCopyright © 2025. All rights reserved.