Class AntlrTask<T>
java.lang.Object
org.pgcodekeeper.core.database.base.parser.AntlrTask<T>
- Type Parameters:
T- type of the result produced by the parsing task
Wrapper for asynchronous ANTLR parsing tasks that combines a Future with a completion handler.
Allows executing parsing tasks in background and processing results when complete.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()Waits for the task to complete and processes the result with the finalizer.
-
Constructor Details
-
AntlrTask
Creates a new ANTLR task with a Future and completion handler.- Parameters:
future- the Future representing the asynchronous parsing taskfinalizer- consumer that will process the parsing result when task completes
-
-
Method Details
-
finish
Waits for the task to complete and processes the result with the finalizer. Propagates any exceptions that occurred during execution.- Throws:
ExecutionException- if the computation threw an exception
-