Package com.blackrook.redis.event
Class RedisMonitorEvent
- java.lang.Object
-
- com.blackrook.redis.event.RedisMonitorEvent
-
public final class RedisMonitorEvent extends Object
An event class that is emitted from aRedisMonitorConnection
whenever it receives an event from the connection.- Author:
- Matthew Tropiano
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAddress()
String[]
getArguments()
String
getCommand()
int
getDBId()
int
getPort()
Date
getServerTime()
long
getServerTimeMicros()
long
getServerTimeSeconds()
static RedisMonitorEvent
parse(String monitorString)
Parses a string read by a MONITORed connection and turns it into an event.
-
-
-
Method Detail
-
parse
public static RedisMonitorEvent parse(String monitorString)
Parses a string read by a MONITORed connection and turns it into an event.- Parameters:
monitorString
- the Redis Monitor string to parse.- Returns:
- the monitor event emitted.
- Throws:
RedisParseException
- if the monitor string is malformed.
-
getServerTimeSeconds
public long getServerTimeSeconds()
- Returns:
- the server time of the event in seconds since the Epoch.
-
getServerTimeMicros
public long getServerTimeMicros()
- Returns:
- the server time remainder of the event in microseconds.
-
getDBId
public int getDBId()
- Returns:
- the originating Database id.
-
getAddress
public String getAddress()
- Returns:
- the originating IP address.
-
getPort
public int getPort()
- Returns:
- the originating IP remote port.
-
getCommand
public String getCommand()
- Returns:
- the issued command.
-
getArguments
public String[] getArguments()
- Returns:
- the commands arguments.
-
-