K
- Key type.V
- Value type.public interface RedisServerCommands<K,V>
Modifier and Type | Method and Description |
---|---|
String |
bgrewriteaof()
Asynchronously rewrite the append-only file.
|
String |
bgsave()
Asynchronously save the dataset to disk.
|
K |
clientGetname()
Get the current connection name.
|
Long |
clientKill(KillArgs killArgs)
Kill connections of clients which are filtered by
killArgs |
String |
clientKill(String addr)
Kill the connection of a client identified by ip:port.
|
String |
clientList()
Get the list of client connections.
|
String |
clientPause(long timeout)
Stop processing commands from clients for some time.
|
String |
clientSetname(K name)
Set the current connection name.
|
Long |
clientUnblock(long id,
UnblockType type)
Unblock the specified blocked client.
|
List<Object> |
command()
Returns an array reply of details about all Redis commands.
|
Long |
commandCount()
Get total number of Redis commands.
|
List<Object> |
commandInfo(CommandType... commands)
Returns an array reply of details about the requested commands.
|
List<Object> |
commandInfo(String... commands)
Returns an array reply of details about the requested commands.
|
Map<String,String> |
configGet(String parameter)
Get the value of a configuration parameter.
|
String |
configResetstat()
Reset the stats returned by INFO.
|
String |
configRewrite()
Rewrite the configuration file with the in memory configuration.
|
String |
configSet(String parameter,
String value)
Set a configuration parameter to the given value.
|
Long |
dbsize()
Return the number of keys in the selected database.
|
String |
debugCrashAndRecover(Long delay)
Crash and recover
|
String |
debugHtstats(int db)
Get debugging information about the internal hash-table state.
|
String |
debugObject(K key)
Get debugging information about a key.
|
void |
debugOom()
Make the server crash: Out of memory.
|
String |
debugReload()
Save RDB, clear the database and reload RDB.
|
String |
debugRestart(Long delay)
Restart the server gracefully.
|
String |
debugSdslen(K key)
Get debugging information about the internal SDS length.
|
void |
debugSegfault()
Make the server crash: Invalid pointer access.
|
String |
flushall()
Remove all keys from all databases.
|
String |
flushallAsync()
Remove all keys asynchronously from all databases.
|
String |
flushdb()
Remove all keys from the current database.
|
String |
flushdbAsync()
Remove all keys asynchronously from the current database.
|
String |
info()
Get information and statistics about the server.
|
String |
info(String section)
Get information and statistics about the server.
|
Date |
lastsave()
Get the UNIX time stamp of the last successful save to disk.
|
String |
save()
Synchronously save the dataset to disk.
|
void |
shutdown(boolean save)
Synchronously save the dataset to disk and then shut down the server.
|
String |
slaveof(String host,
int port)
Make the server a slave of another instance, or promote it as master.
|
String |
slaveofNoOne()
Promote server as master.
|
List<Object> |
slowlogGet()
Read the slow log.
|
List<Object> |
slowlogGet(int count)
Read the slow log.
|
Long |
slowlogLen()
Obtaining the current length of the slow log.
|
String |
slowlogReset()
Resetting the slow log.
|
List<V> |
time()
Return the current server time.
|
String bgrewriteaof()
OK
.String bgsave()
K clientGetname()
String clientSetname(K name)
name
- the client nameOK
if the connection name was successfully set.String clientKill(String addr)
addr
- ip:portOK
if the connection exists and has been closedLong clientKill(KillArgs killArgs)
killArgs
killArgs
- args for the kill operationLong clientUnblock(long id, UnblockType type)
id
- the client id.type
- unblock type.String clientPause(long timeout)
timeout
- the timeout value in millisecondsString clientList()
List<Object> command()
List<Object> commandInfo(String... commands)
commands
- the commands to query forList<Object> commandInfo(CommandType... commands)
commands
- the commands to query forLong commandCount()
Map<String,String> configGet(String parameter)
parameter
- name of the parameterString configResetstat()
OK
.String configRewrite()
OK
when the configuration was rewritten properly. Otherwise an error is
returned.String configSet(String parameter, String value)
parameter
- the parameter namevalue
- the parameter valueOK
when the configuration was set properly. Otherwise an error is returned.Long dbsize()
String debugCrashAndRecover(Long delay)
delay
- optional delay in millisecondsString debugHtstats(int db)
db
- the database numberString debugObject(K key)
key
- the keyvoid debugOom()
void debugSegfault()
String debugReload()
String debugRestart(Long delay)
delay
- optional delay in millisecondsString debugSdslen(K key)
key
- the keyString flushall()
String flushallAsync()
String flushdb()
String flushdbAsync()
String info()
String info(String section)
section
- the section type: stringDate lastsave()
String save()
void shutdown(boolean save)
save
- true force save operationString slaveof(String host, int port)
host
- the host type: stringport
- the port type: stringString slaveofNoOne()
List<Object> slowlogGet()
List<Object> slowlogGet(int count)
count
- the countLong slowlogLen()
String slowlogReset()
Copyright © 2018 lettuce.io. All rights reserved.