public class JRedisClient extends SyncJRedisBase
| Modifier and Type | Field and Description |
|---|---|
private Connection |
connection |
CacheKeys| Constructor and Description |
|---|
JRedisClient()
and using localhost:6379 as its network addressing parameters.
|
JRedisClient(ConnectionSpec connectionSpec) |
JRedisClient(java.lang.String password)
Connects to the localhost:6379 redis server using the password.
|
JRedisClient(java.lang.String host,
int port) |
JRedisClient(java.lang.String host,
int port,
java.lang.String password,
int database)
New JRedisClient for the default protocol version
RedisVersion |
| Modifier and Type | Method and Description |
|---|---|
private static byte[] |
getCredentialBytes(java.lang.String password)
Internal use only -
|
JRedis |
getInterface() |
protected Response |
serviceRequest(Command cmd,
byte[]... args)
This method mimics the eponymous
Connection#serviceRequest(Command, byte[]...)
which defines the blocking api semantics of Synchronous connections. |
protected void |
setConnection(Connection connection)
This extension point is really only necessary to allow this class to
set the
FaultedConnection when necessary, in course of the
SyncJRedisBase#createSyncConnection(String)
method operation. |
createSyncConnection, getContext, setContextappend, append, append, append, bgrewriteaof, bgsave, dbsize, debug, decr, decrby, del, discard, echo, echo, echo, echo, exists, expire, expireat, flushall, flushdb, get, getbit, getKeyBytes, getset, getset, getset, getset, hdel, hexists, hget, hgetall, hkeys, hlen, hset, hset, hset, hset, hvals, incr, incrby, info, keys, keys, lastsave, lindex, llen, lpop, lpush, lpush, lpush, lpush, lrange, lrem, lrem, lrem, lrem, lset, lset, lset, lset, ltrim, mget, move, mset, mset, mset, mset, mset, msetnx, msetnx, msetnx, msetnx, msetnx, multi, ping, quit, randomkey, rename, renamenx, rpop, rpoplpush, rpush, rpush, rpush, rpush, sadd, sadd, sadd, sadd, save, scard, sdiff, sdiffstore, set, set, set, set, setbit, setnx, setnx, setnx, setnx, sinter, sinterstore, sismember, sismember, sismember, sismember, slaveof, slaveofnone, smembers, smove, smove, smove, smove, sort, spop, srandmember, srem, srem, srem, srem, substr, sunion, sunionstore, ttl, type, zadd, zadd, zadd, zadd, zcard, zcount, zincrby, zincrby, zincrby, zincrby, zrange, zrangebyscore, zrangebyscoreSubset, zrangeSubset, zrank, zrank, zrank, zrank, zrem, zrem, zrem, zrem, zremrangebyrank, zremrangebyscore, zrevrange, zrevrangeSubset, zrevrank, zrevrank, zrevrank, zrevrank, zscore, zscore, zscore, zscoreprivate Connection connection
public JRedisClient(ConnectionSpec connectionSpec)
public JRedisClient(java.lang.String password)
throws ClientRuntimeException
password - used for AUTHjava.net.UnknownHostExceptionClientRuntimeExceptionpublic JRedisClient()
throws ClientRuntimeException
java.net.UnknownHostExceptionClientRuntimeExceptionpublic JRedisClient(java.lang.String host,
int port)
throws ClientRuntimeException
host - port - java.net.UnknownHostExceptionClientRuntimeExceptionpublic JRedisClient(java.lang.String host,
int port,
java.lang.String password,
int database)
throws ClientRuntimeException
RedisVersionhost - redis server's hostport - redis server's portpassword - to use for AUTHentication (can be null)database - database to select on connectClientRuntimeExceptionjava.net.UnknownHostExceptionprotected Response serviceRequest(Command cmd, byte[]... args) throws RedisException, ClientRuntimeException, ProviderException
JRedisSupportConnection#serviceRequest(Command, byte[]...)
which defines the blocking api semantics of Synchronous connections. The extending class
can either directly (a) implement the protocol requirements, or, (b) delegate to a
Connection instance, or, (c) utilize a pool of Connections.serviceRequest in class JRedisSupportRedisExceptionClientRuntimeExceptionProviderExceptionprotected final void setConnection(Connection connection)
SyncJRedisBaseFaultedConnection when necessary, in course of the
SyncJRedisBase#createSyncConnection(String)
method operation.setConnection in class SyncJRedisBasepublic JRedis getInterface()
private static byte[] getCredentialBytes(java.lang.String password)
password -