
com.github.wz2cool.localqueue.IReader Maven / Gradle / Ivy
package com.github.wz2cool.localqueue;
import com.github.wz2cool.localqueue.model.message.QueueMessage;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
public interface IReader {
QueueMessage take() throws InterruptedException;
List batchTake(int maxBatchSize) throws InterruptedException;
Optional take(long timeout, TimeUnit unit) throws InterruptedException;
List batchTake(int maxBatchSize, long timeout, TimeUnit unit) throws InterruptedException;
Optional poll();
List batchPoll(int maxBatchSize);
void ack(long position);
void ack(List messages);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy