use of com.alibaba.otter.canal.protocol.position.LogPosition in project canal by alibaba.
the class MemoryEventStoreWithBuffer method get.
public Events<Event> get(Position start, int batchSize) throws InterruptedException, CanalStoreException {
final ReentrantLock lock = this.lock;
lock.lockInterruptibly();
try {
try {
while (!checkUnGetSlotAt((LogPosition) start, batchSize)) notEmpty.await();
} catch (InterruptedException ie) {
// propagate to non-interrupted thread
notEmpty.signal();
throw ie;
}
return doGet(start, batchSize);
} finally {
lock.unlock();
}
}
Aggregations