You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2022/06/20 18:54:00 UTC

[jira] [Closed] (IO-456) TailerListenerAdapter: handleEnd() method

     [ https://issues.apache.org/jira/browse/IO-456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory closed IO-456.
------------------------------
    Fix Version/s: 2.5
       Resolution: Fixed

Version 2.5 added {{org.apache.commons.io.input.TailerListenerAdapter.endOfFileReached()}}

> TailerListenerAdapter: handleEnd() method
> -----------------------------------------
>
>                 Key: IO-456
>                 URL: https://issues.apache.org/jira/browse/IO-456
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.4
>            Reporter: Andrew Bourgeois
>            Priority: Minor
>              Labels: performance
>             Fix For: 2.5
>
>
> The current implementation of the org.apache.commons.io.input.Tailer class doesn't allow you to get notified after an execution.
> This can be a problem when a single execution processes thousands of lines (= http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/TailerListener.html#handle(java.lang.String) will be called for every line) and you want to perform a resource-intensive task at the end of all this.
> The solution to this problem would be to add a handleEnd() method to the TailerListener interface and to call it from the Tailer class somewhere after the readLines call the the horrible Thread.sleep call.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)