public class RedisManager extends Object
| Constructor and Description |
|---|
RedisManager() |
| Modifier and Type | Method and Description |
|---|---|
Long |
dbSize()
size
|
void |
del(byte[] key)
del
|
void |
flushDB()
flush
|
byte[] |
get(byte[] key)
get value from redis
|
int |
getExpire() |
String |
getHost() |
String |
getPassword() |
int |
getPort() |
int |
getTimeout() |
void |
init()
初始化方法
|
Set<byte[]> |
keys(String pattern)
keys
|
byte[] |
set(byte[] key,
byte[] value)
set
|
byte[] |
set(byte[] key,
byte[] value,
int expire)
set
|
void |
setExpire(int expire) |
void |
setHost(String host) |
void |
setPassword(String password) |
void |
setPort(int port) |
void |
setTimeout(int timeout) |
public void init()
public byte[] get(byte[] key)
key - public byte[] set(byte[] key,
byte[] value)
key - value - public byte[] set(byte[] key,
byte[] value,
int expire)
key - value - expire - public void del(byte[] key)
key - public void flushDB()
public Long dbSize()
public String getHost()
public void setHost(String host)
public int getPort()
public void setPort(int port)
public int getExpire()
public void setExpire(int expire)
public int getTimeout()
public void setTimeout(int timeout)
public String getPassword()
public void setPassword(String password)
Copyright © 2017. All rights reserved.