You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Davide Giannella (JIRA)" <ji...@apache.org> on 2016/02/22 10:08:18 UTC

[jira] [Comment Edited] (OAK-4025) Reuse ExecutorUtils to shutdown ExecutorService

    [ https://issues.apache.org/jira/browse/OAK-4025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15156655#comment-15156655 ] 

Davide Giannella edited comment on OAK-4025 at 2/22/16 9:08 AM:
----------------------------------------------------------------

The ExecutorUtils came because I found that we're dealing with closing Executor services around our codebase in various points. Not all of them using a closer approach for any reason. Often we forget either the try/catch, the shutdownNow or tracking when something happens. The utils aim in generalising the approach avoiding code duplication.

So far I stumbled up the two classes in the description, where we close executors, but I didn't perform any proactive search in the codebase.

If no objections I will push the patch in a couple of days. I can change the javadoc either.


was (Author: edivad):
The ExecutorUtils came because I found that we're dealing with closing Executor services around our codebase in various points. Not all of them using a closer approach for any reason. Often we forget either the try/catch, the shutdownNow or tracking when something happens. The utils aim in generalising the approach avoiding code duplication.

So far I stumbled up the two classes in the description, where we close executors, but I didn't perform any proactive search in the codebase.

If no objections I will push the patch in a couple of days

> Reuse ExecutorUtils to shutdown ExecutorService
> -----------------------------------------------
>
>                 Key: OAK-4025
>                 URL: https://issues.apache.org/jira/browse/OAK-4025
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.3.16
>            Reporter: Davide Giannella
>            Assignee: Davide Giannella
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: OAK-4025-1.patch
>
>
> A utility class ExecutorUtils has been created in oak-commons. It provides a convenience method for gracefully shutdown an ExecutorService.
> For code clean-up reuse it in ExecutorCloser.java and AtomicCounterEditorProvider.java.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)