Package org.apache.calcite.test
Class CsvTest.Worker<E>
- java.lang.Object
-
- org.apache.calcite.test.CsvTest.Worker<E>
-
- Type Parameters:
E
- Result value of commands
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.Runnable
- Enclosing class:
- CsvTest
private static class CsvTest.Worker<E> extends java.lang.Object implements java.lang.Runnable, java.lang.AutoCloseable
Receives commands on a queue and executes them on its own thread. Callclose()
to terminate.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Exception
e
Exception thrown by a command or queue wait.(package private) java.util.concurrent.Callable<E>
end
The poison pill command.(package private) java.util.concurrent.BlockingQueue<java.util.concurrent.Callable<E>>
queue
Queue of commands.private E
v
Value returned by the most recent command.
-
Constructor Summary
Constructors Modifier Constructor Description private
Worker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
run()
-
-
-
Field Detail
-
queue
final java.util.concurrent.BlockingQueue<java.util.concurrent.Callable<E>> queue
Queue of commands.
-
v
private E v
Value returned by the most recent command.
-
e
private java.lang.Exception e
Exception thrown by a command or queue wait.
-
end
final java.util.concurrent.Callable<E> end
The poison pill command.
-
-