public interface DatabaseCommands
Modifier and Type | Method and Description |
---|---|
boolean |
copy(byte[] srcKey,
byte[] dstKey,
int db,
boolean replace) |
boolean |
copy(String srcKey,
String dstKey,
int db,
boolean replace) |
long |
dbSize()
Return the number of keys in the currently-selected database.
|
String |
flushDB(FlushMode flushMode)
Delete all the keys of the currently selected DB.
|
String |
migrate(String host,
int port,
byte[] key,
int destinationDB,
int timeout) |
String |
migrate(String host,
int port,
int destinationDB,
int timeout,
MigrateParams params,
byte[]... keys) |
String |
migrate(String host,
int port,
int destinationDB,
int timeout,
MigrateParams params,
String... keys) |
String |
migrate(String host,
int port,
String key,
int destinationDB,
int timeout) |
long |
move(byte[] key,
int dbIndex) |
long |
move(String key,
int dbIndex) |
String |
select(int index)
Select the DB with having the specified zero-based numeric index.
|
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.
|
String select(int index)
index
- the indexlong dbSize()
String flushDB(FlushMode flushMode)
flushMode
- String swapDB(int index1, int index2)
index1
- index2
- long move(String key, int dbIndex)
long move(byte[] key, int dbIndex)
boolean copy(byte[] srcKey, byte[] dstKey, int db, boolean replace)
String migrate(String host, int port, int destinationDB, int timeout, MigrateParams params, byte[]... keys)
String migrate(String host, int port, int destinationDB, int timeout, MigrateParams params, String... keys)
Copyright © 2021. All rights reserved.