org.springframework.data.redis.connection
Interface RedisServerCommands

All Known Subinterfaces:
RedisCommands, RedisConnection, StringRedisConnection
All Known Implementing Classes:
DefaultStringRedisConnection, JedisConnection, JredisConnection, LettuceConnection, SrpConnection

public interface RedisServerCommands

Server-specific commands supported by Redis.


Nested Class Summary
static class RedisServerCommands.ShutdownOption
           
 
Method Summary
 void bgReWriteAof()
          Start an Append Only File rewrite process on server.
 void bgSave()
          Start background saving of db on server.
 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.
 List<String> getConfig(String pattern)
          Load configuration parameters for given pattern from server.
 Properties info()
          Load default server information like mempory cpu utilization replication
 Properties info(String section)
          Load server information for given selection.
 void killClient(String host, int port)
          <<<<<<< HEAD Closes a given client connection identified by ip:port.
 Long lastSave()
          Get time of last bgSave() operation in seconds.
 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 key 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.
 

Method Detail

bgWriteAof

@Deprecated
void bgWriteAof()
Deprecated. As of 1.3, use bgReWriteAof().

Start an Append Only File rewrite process on server.

See Also:
http://redis.io/commands/bgrewriteaof

bgReWriteAof

void bgReWriteAof()
Start an Append Only File rewrite process on server.

Since:
1.3
See Also:
http://redis.io/commands/bgrewriteaof

bgSave

void bgSave()
Start background saving of db on server.

See Also:
http://redis.io/commands/bgsave

lastSave

Long lastSave()
Get time of last bgSave() operation in seconds.

Returns:
See Also:
http://redis.io/commands/lastsave

save

void save()
Synchronous save current db snapshot on server.

See Also:
http://redis.io/commands/save

dbSize

Long dbSize()
Get the total number of available keys in currently selected database.

Returns:
See Also:
http://redis.io/commands/dbsize

flushDb

void flushDb()
Delete all keys of the currently selected database.

See Also:
http://redis.io/commands/flushdb

flushAll

void flushAll()
Delete all all keys from all databases.

See Also:
http://redis.io/commands/flushall

info

Properties info()
Load default server information like

Returns:
See Also:
http://redis.io/commands/info

info

Properties info(String section)
Load server information for given selection.

Returns:
See Also:
http://redis.io/commands/info

shutdown

void shutdown()
Shutdown server.

See Also:
http://redis.io/commands/shutdown

shutdown

void shutdown(RedisServerCommands.ShutdownOption option)
Shutdown server.

Since:
1.3
See Also:
http://redis.io/commands/shutdown

getConfig

List<String> getConfig(String pattern)
Load configuration parameters for given pattern from server.

Parameters:
pattern -
Returns:
See Also:
http://redis.io/commands/config-get

setConfig

void setConfig(String param,
               String value)
Set server configuration for key to value.

Parameters:
param -
value -
See Also:
http://redis.io/commands/config-set

resetConfigStats

void resetConfigStats()
Reset statistic counters on server.
Counters can be retrieved using info().

See Also:
http://redis.io/commands/config-resetstat

time

Long time()
Request server timestamp using TIME command.

Returns:
current server time in milliseconds.
Since:
1.1

killClient

void killClient(String host,
                int port)
<<<<<<< HEAD Closes a given client connection identified by ip:port.

Parameters:
host - of connection to close.
port - of connection to close
Since:
1.3

setClientName

void setClientName(byte[] name)
Assign given name to current connection.

Since:
1.3

getClientName

String getClientName()
Returns the name of the current connection.

Returns:
Since:
1.3
See Also:
http://redis.io/commands/client-getname

getClientList

List<RedisClientInfo> getClientList()
Request information and statistics about connected clients.

Returns:
List of RedisClientInfo objects.
Since:
1.3
See Also:
http://redis.io/commands/client-list

slaveOf

void slaveOf(String host,
             int port)
Change redis replication setting to new master.

Parameters:
host -
port -
Since:
1.3
See Also:
http://redis.io/commands/slaveof

slaveOfNoOne

void slaveOfNoOne()
Change server into master.

Since:
1.3
See Also:
http://redis.io/commands/slaveof