Package com.blackrook.redis
Class RedisDebugConnection
- java.lang.Object
-
- com.blackrook.redis.RedisConnectionAbstract
-
- com.blackrook.redis.RedisDebugConnection
-
- All Implemented Interfaces:
RedisDebugCommands
,AutoCloseable
public class RedisDebugConnection extends RedisConnectionAbstract implements RedisDebugCommands
A connection to Redis that only provides debug calls to the server.- Author:
- Matthew Tropiano
-
-
Field Summary
-
Fields inherited from class com.blackrook.redis.RedisConnectionAbstract
reader, writer
-
-
Constructor Summary
Constructors Constructor Description RedisDebugConnection()
Creates an open connection to localhost, port 6379, the default Redis port.RedisDebugConnection(RedisInfo info)
Creates an open connection.RedisDebugConnection(String host, int port)
Creates an open connection.RedisDebugConnection(String host, int port, String password)
Creates an open connection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
debugObject(String key)
void
debugSegfault()
-
Methods inherited from class com.blackrook.redis.RedisConnectionAbstract
close, disconnect, isBound, isClosed, isConnected, reconnect
-
-
-
-
Constructor Detail
-
RedisDebugConnection
public RedisDebugConnection() throws IOException
Creates an open connection to localhost, port 6379, the default Redis port.- Throws:
IOException
- if an I/O error occurs when creating the socket.UnknownHostException
- if the IP address of the host could not be determined.SecurityException
- if a security manager exists and doesn't allow the connection to be made.
-
RedisDebugConnection
public RedisDebugConnection(String host, int port) throws IOException
Creates an open connection.- Parameters:
host
- the server hostname or address.port
- the server connection port.- Throws:
IOException
- if an I/O error occurs when creating the socket.UnknownHostException
- if the IP address of the host could not be determined.SecurityException
- if a security manager exists and doesn't allow the connection to be made.
-
RedisDebugConnection
public RedisDebugConnection(String host, int port, String password) throws IOException
Creates an open connection.- Parameters:
host
- the server hostname or address.port
- the server connection port.password
- the server database password.- Throws:
IOException
- if an I/O error occurs when creating the socket.UnknownHostException
- if the IP address of the host could not be determined.SecurityException
- if a security manager exists and doesn't allow the connection to be made.RedisException
- if the password in the server information is incorrect.
-
RedisDebugConnection
public RedisDebugConnection(RedisInfo info) throws IOException
Creates an open connection.- Parameters:
info
- theRedisInfo
class detailing a connection.- Throws:
IOException
- if an I/O error occurs when creating the socket.UnknownHostException
- if the IP address of the host could not be determined.SecurityException
- if a security manager exists and doesn't allow the connection to be made.RedisException
- if the password in the server information is incorrect.
-
-
Method Detail
-
debugObject
public String debugObject(String key)
Description copied from interface:RedisDebugCommands
From http://redis.io/commands/debug-object:
Available since 1.0.0.
DEBUG OBJECT
is a debugging command that should not be used by clients. Check theRedisServerCommands.object(String, String)
command instead.- Specified by:
debugObject
in interfaceRedisDebugCommands
- Parameters:
key
- the value key.- Returns:
- the debug output.
-
debugSegfault
public void debugSegfault()
Description copied from interface:RedisDebugCommands
From http://redis.io/commands/debug-segfault:
Available since 1.0.0.
DEBUG SEGFAULT
performs an invalid memory access that crashes Redis. It is used to simulate bugs during the development.- Specified by:
debugSegfault
in interfaceRedisDebugCommands
-
-