Class RedisMonitorEvent

java.lang.Object
com.blackrook.redis.event.RedisMonitorEvent

public final class RedisMonitorEvent extends Object
An event class that is emitted from a RedisMonitorConnection whenever it receives an event from the connection.
Author:
Matthew Tropiano
  • Method Details

    • 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.
    • getServerTime

      public Date getServerTime()
      Returns:
      the server time as a Date.
    • 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.