@Override @Nullable public E peekLast() { return listOps.index(-1); }
@Override @Nullable public E peek() { return listOps.index(0); }
@Override public E get(int index) { if (index < 0 || index > size()) { throw new IndexOutOfBoundsException(); } return listOps.index(index); }
@Override @Nullable public E peek() { return listOps.index(0); }
@Override @Nullable public E peekLast() { return listOps.index(-1); }
@Override @Nullable public E peekLast() { return listOps.index(-1); }
@Override @Nullable public E peek() { return listOps.index(0); }
@Override public E get(int index) { if (index < 0 || index > size()) { throw new IndexOutOfBoundsException(); } return listOps.index(index); }
@Override public E get(int index) { if (index < 0 || index > size()) { throw new IndexOutOfBoundsException(); } return listOps.index(index); }
public <T> Message<T> peekNextMessageInQueue(String queueName, String consumerId, Class<T> payloadType) { String queueKey = keyForConsumerSpecificQueue(queueName, consumerId); BoundListOperations<String, String> ops = redisTemplate.boundListOps(queueKey); String nextId = ops.index(0); if (nextId == null) { return null; } return loadMessageById(queueName, nextId, payloadType); }