Class DefaultProgressMonitor

    • Field Detail

      • earleyFrequency

        public static int earleyFrequency
        The default update interval (number of tokens).
      • gllFrequency

        public static int gllFrequency
        The default update interval (number of states).
      • minimumTimeInterval

        public static long minimumTimeInterval
    • Constructor Detail

      • DefaultProgressMonitor

        public DefaultProgressMonitor()
        Create a progress monitor.
    • Method Detail

      • starting

        public int starting​(GearleyParser parser,
                            int tokens)
        Start the monitor.
        Specified by:
        starting in interface ProgressMonitor
        Parameters:
        parser - the parser
        tokens - the total size of the input
        Returns:
        the update interval.
      • progress

        public void progress​(GearleyParser parser,
                             int tokens)
        Report progress.

        This implementation just prints a simple message to System.out.

        Specified by:
        progress in interface ProgressMonitor
        Parameters:
        parser - the parser
        tokens - the number of tokens processed so far.
      • workingSet

        public void workingSet​(GearleyParser parser,
                               int size,
                               int highwater)
        Report progress.

        This implementation just prints a simple message to System.out.

        Specified by:
        workingSet in interface ProgressMonitor
        Parameters:
        parser - the parser
        size - the number of items that remain in the working set.
        highwater - the last token seen.