[
https://issues.apache.org/jira/browse/OAK-4025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15156662#comment-15156662
]
Chetan Mehrotra edited comment on OAK-4025 at 2/22/16 9:16 AM:
---------------------------------------------------------------
bq. Not all of them using a closer approach for any reason.
For such case you can simply do {{new
ExecutorCloser(executorService).close();}} or provide a static {{closeNow}}
method on {{ExecutorCloser}}. Would be good if we can avoid introducing a new
class for this. So far it looks like {{ExecutorUtils}} is only being used in
test, so better to refactor that to use {{ExecutorCloser}}
was (Author: chetanm):
bq. Not all of them using a closer approach for any reason.
For such case you can simply do {{new
ExecutorCloser(executorService).close();}} or provide a static {{closeNow}}
method on {{ExecutorCloser}}. Would be good if we can avoid introducing a new
class for this.
> 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)