@Test public void testGetMaxId() throws IOException { SeqGenerator generator = new SeqGenerator(); String ret = generator.getNextSeq("16081915211809289"); System.out.println(ret); }
public String getNextSeq() throws IOException { Jedis jedis = getResource(); try { String seq = getSeq(); Object result = jedis.evalsha(sha1, 1, seq.getBytes()); String ret = new String((byte[])result); return ret; } finally { returnResource(jedis); } }
SeqGenerator { public String getNextSeq() throws IOException { Jedis jedis = getResource(); try { String seq = getSeq(); Object result = jedis.evalsha(sha1, 1, seq.getBytes()); String ret = new String((byte[])result); return ret; } finally { returnResource(jedis); } } }
SeqGenerator { public String getNextSeq() throws IOException { Jedis jedis = getResource(); try { String seq = getSeq(); Object result = jedis.evalsha(sha1, 1, seq.getBytes()); String ret = new String((byte[])result); return ret; } finally { returnResource(jedis); } } SeqGenerator(); }
SeqGenerator { public String getNextSeq() throws IOException { Jedis jedis = getResource(); try { String seq = getSeq(); Object result = jedis.evalsha(sha1, 1, seq.getBytes()); String ret = new String((byte[])result); return ret; } finally { returnResource(jedis); } } SeqGenerator(); Jedis getResource(); void returnResource(Jedis jedis); String getNextSeq(); String getNextSeq(String seq); String getSeq(); void setAndExpireWithPipeline(); void setAndExpire(); void setAndExpireWithTran(); static void main(String[] args); }
SeqGenerator { public String getNextSeq() throws IOException { Jedis jedis = getResource(); try { String seq = getSeq(); Object result = jedis.evalsha(sha1, 1, seq.getBytes()); String ret = new String((byte[])result); return ret; } finally { returnResource(jedis); } } SeqGenerator(); Jedis getResource(); void returnResource(Jedis jedis); String getNextSeq(); String getNextSeq(String seq); String getSeq(); void setAndExpireWithPipeline(); void setAndExpire(); void setAndExpireWithTran(); static void main(String[] args);  }