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

public class AntlrTask<T> extends Object
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
    Constructor
    Description
    AntlrTask(Future<T> future, Consumer<T> finalizer)
    Creates a new ANTLR task with a Future and completion handler.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Waits for the task to complete and processes the result with the finalizer.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AntlrTask

      public AntlrTask(Future<T> future, Consumer<T> finalizer)
      Creates a new ANTLR task with a Future and completion handler.
      Parameters:
      future - the Future representing the asynchronous parsing task
      finalizer - consumer that will process the parsing result when task completes
  • Method Details

    • finish

      public void finish() throws ExecutionException
      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