Package redis.clients.jedis
Class Connection
- java.lang.Object
-
- redis.clients.jedis.Connection
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class Connection extends java.lang.Object implements java.io.CloseableRepresents a connection to a server. This is part of the Jedis compatibility layer.
-
-
Constructor Summary
Constructors Constructor Description Connection(HostAndPort hostAndPort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.StringgetHost()Get the hostHostAndPortgetHostAndPort()Get the host and port for this connectionintgetPort()Get the port
-
-
-
Constructor Detail
-
Connection
public Connection(HostAndPort hostAndPort)
-
-
Method Detail
-
getHostAndPort
public HostAndPort getHostAndPort()
Get the host and port for this connection
-
getHost
public java.lang.String getHost()
Get the host
-
getPort
public int getPort()
Get the port
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-