java.lang.Object
io.lettuce.core.metrics.CommandLatencyId
- All Implemented Interfaces:
Serializable,Comparable<CommandLatencyId>
public class CommandLatencyId extends Object implements Serializable, Comparable<CommandLatencyId>
Identifier for a command latency. Consists of a local/remote tuple of
SocketAddresses and a
commandType part.- Author:
- Mark Paluch
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Modifier Constructor Description protectedCommandLatencyId(SocketAddress localAddress, SocketAddress remoteAddress, ProtocolKeyword commandType) -
Method Summary
Modifier and Type Method Description ProtocolKeywordcommandType()Returns the command type.intcompareTo(CommandLatencyId o)static CommandLatencyIdcreate(SocketAddress localAddress, SocketAddress remoteAddress, ProtocolKeyword commandType)Create a new instance ofCommandLatencyId.booleanequals(Object o)inthashCode()SocketAddresslocalAddress()Returns the local address.SocketAddressremoteAddress()Returns the remote address.StringtoString()
-
Constructor Details
-
CommandLatencyId
protected CommandLatencyId(SocketAddress localAddress, SocketAddress remoteAddress, ProtocolKeyword commandType)
-
-
Method Details
-
create
public static CommandLatencyId create(SocketAddress localAddress, SocketAddress remoteAddress, ProtocolKeyword commandType)Create a new instance ofCommandLatencyId.- Parameters:
localAddress- the local addressremoteAddress- the remote addresscommandType- the command type- Returns:
- a new instance of
CommandLatencyId
-
localAddress
Returns the local address.- Returns:
- the local address
-
remoteAddress
Returns the remote address.- Returns:
- the remote address
-
commandType
Returns the command type.- Returns:
- the command type
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<CommandLatencyId>
-
toString
-