public interface RedisServerCommands
Modifier and Type | Interface and Description |
---|---|
static class |
RedisServerCommands.MigrateOption |
static class |
RedisServerCommands.ShutdownOption |
Modifier and Type | Method and Description |
---|---|
void |
bgReWriteAof()
Start an Append Only File rewrite process on server.
|
void |
bgSave()
Start background saving of db on server.
|
default void |
bgWriteAof()
Deprecated.
As of 1.3, use
bgReWriteAof() . |
Long |
dbSize()
Get the total number of available keys in currently selected database.
|
void |
flushAll()
Delete all all keys from all databases.
|
void |
flushDb()
Delete all keys of the currently selected database.
|
List<RedisClientInfo> |
getClientList()
Request information and statistics about connected clients.
|
String |
getClientName()
Returns the name of the current connection.
|
Properties |
getConfig(String pattern)
Load configuration parameters for given
pattern from server. |
Properties |
info()
Load default server information like
memory
cpu utilization
replication
|
Properties |
info(String section)
Load server information for given
selection . |
void |
killClient(String host,
int port)
Closes a given client connection identified by host:port.
|
Long |
lastSave()
Get time of last
bgSave() operation in seconds. |
void |
migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option)
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
void |
migrate(byte[] key,
RedisNode target,
int dbIndex,
RedisServerCommands.MigrateOption option,
long timeout)
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
void |
resetConfigStats()
Reset statistic counters on server.
|
void |
save()
Synchronous save current db snapshot on server.
|
void |
setClientName(byte[] name)
Assign given name to current connection.
|
void |
setConfig(String param,
String value)
Set server configuration for
param to value . |
void |
shutdown()
Shutdown server.
|
void |
shutdown(RedisServerCommands.ShutdownOption option)
Shutdown server.
|
void |
slaveOf(String host,
int port)
Change redis replication setting to new master.
|
void |
slaveOfNoOne()
Change server into master.
|
Long |
time()
Request server timestamp using
TIME command. |
@Deprecated default void bgWriteAof()
bgReWriteAof()
.void bgReWriteAof()
void bgSave()
@Nullable Long lastSave()
bgSave()
operation in seconds.void save()
@Nullable Long dbSize()
void flushDb()
void flushAll()
@Nullable Properties info()
@Nullable Properties info(String section)
selection
.void shutdown()
void shutdown(RedisServerCommands.ShutdownOption option)
@Nullable Properties getConfig(String pattern)
pattern
from server.pattern
- must not be null.void setConfig(String param, String value)
param
to value
.param
- must not be null.value
- must not be null.void resetConfigStats()
info()
.@Nullable Long time()
TIME
command.void killClient(String host, int port)
host
- of connection to close.port
- of connection to closevoid setClientName(byte[] name)
name
- @Nullable String getClientName()
@Nullable List<RedisClientInfo> getClientList()
List
of RedisClientInfo
objects or null when used in pipeline / transaction.void slaveOf(String host, int port)
host
- must not be null.port
- void slaveOfNoOne()
void migrate(byte[] key, RedisNode target, int dbIndex, @Nullable RedisServerCommands.MigrateOption option)
key
- must not be null.target
- must not be null.dbIndex
- option
- can be null. Defaulted to RedisServerCommands.MigrateOption.COPY
.void migrate(byte[] key, RedisNode target, int dbIndex, @Nullable RedisServerCommands.MigrateOption option, long timeout)
key
- must not be null.target
- must not be null.dbIndex
- option
- can be null. Defaulted to RedisServerCommands.MigrateOption.COPY
.timeout
- Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.