语音信箱
private int PORT = 6379;
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public void intJedis() {
jedisPool = new JedisPool(ADDR, PORT);
}
oil paintingpublic static void main(String[] args) {
// TODO Auto-generated method stub
lingZSetTest ztTest = new ZSetTest();
ztTest.intJedis();
ztTest.addItem();
ztTest.deleteZSet();
}
public void deleteZSet() {
Jedis jedis = Resource();
jedis.del("zt_test");
}
public void addItem() {
Jedis jedis = Resource();
Calendar cal1 = Instance();
cal1.add(Calendar.SECOND, 10);
int cond10later = (int) (TimeInMillis() / 1000);
Calendar cal2 = Instance();
cal2.add(Calendar.SECOND, 20);
int cond20later = (int) (TimeInMillis() / 1000);
Calendar cal3 = Instance();
cal3.add(Calendar.SECOND, 30);
int cond30later = (int) (TimeInMillis() / 1000);
Calendar cal4 = Instance();
cal4.add(Calendar.SECOND, 40);
int cond40later = (int) (TimeInMillis() / 1000);
Calendar cal5 = Instance();
cal5.add(Calendar.SECOND, 50);
int cond50later = (int) (TimeInMillis() / 1000);
jedis.zadd("zt_test", cond50later, "e");
英语句子大全jedis.zadd("zt_test", cond10later, "a");
jedis.zadd("zt_test", cond30later, "c");
西瓜英文
jedis.zadd("zt_test", cond20later, "b");
jedis.zadd("zt_test", cond40later, "d");
redleafSystem.out.println(sdf.format(new Date()) + " add finished.");
}
public void getItem() {
Jedis jedis = Resource();
peeping
while (true) {
verifyemailtry {
谚语有哪些Set<Tuple> t = angeWithScores("zt_test", 0, 0);
String value = ((Tuple) t.toArray()[0]).getElement();
kuso是什么意思int score = (int) ((Tuple) t.toArray()[0]).getScore();
Calendar cal = Instance();
int nowSecond = (int) (TimeInMillis() / 1000);
if (nowSecond >= score) {