co.cask.tigon.app.queue
Interface QueueReader<T>
- Type Parameters:
T - Type of input dequeued from this reader.
public interface QueueReader<T>
This interface defines reading of a InputDatum from the Queue.
dequeue
InputDatum<T> dequeue(long timeout,
TimeUnit timeoutUnit)
throws IOException,
InterruptedException
- Reads an input from the queue.
- Parameters:
timeout - Maximum time for trying to have a non-empty dequeue result.
Depending on the implementation, actual time spent for dequeue
could be longer than the time specified here.timeoutUnit - Unit for the timeout.
- Returns:
- A
InputDatum which
represents the input being read from the queue.
- Throws:
IOException - If fails to dequeue.
InterruptedException - If dequeue is interrupted.
Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.