public List<byte[]> bRPop(int timeout, byte[]... keys) { Object[] args = SrpUtils.convert(timeout, keys); try { if (isPipelined()) { pipeline(pipeline.brpop(args)); return null; } return SrpUtils.toBytesList(client.brpop(args).data()); } catch (Exception ex) { throw convertSrpAccessException(ex); } }
@Test public void brpop() { rc.del(a("list1", "list2")); eq(3, rc.rpush("list1", a("a", "b", "c"))); eq(a("list1", "c"), rc.brpop(a("list1", "list2", "0"))); }