You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Egli (JIRA)" <ji...@apache.org> on 2018/12/13 13:34:00 UTC

[jira] [Commented] (SLING-5884) Deprecate JobManager methods which allow to manage the queue

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

Stefan Egli commented on SLING-5884:
------------------------------------

Created a pull request ([here|https://github.com/apache/sling-org-apache-sling-event-api/pull/1]) which contains the changes as discussed.

Reviews very welcome!

Changes:
* non-deprecated functionality of JobManager moved to a new JobManager2
* JobManager deprecated
* JobManager extends JobManager2
* version of org.apache.sling.event.jobs had to be upped from 2.0.1 to 2.1.0
* "since" tag adjusted to reflect the (earlier) split of org.apache.sling.event.api away from org.apache.sling.event and to indicate exactly what version it refers to (didn't change the old "since" as they are referring to the org.apache.sling.event)

actually deprecated methods:
* {{Job getJobById(String jobId);}}
* {{Job getJob(String topic, Map<String, Object> template);}}
* {{Collection<Job> findJobs(QueryType type, String topic, long limit, Map<String, Object>... templates);}}
* {{Job retryJobById(String jobId);}}

not deprecated methods:
* {{Statistics getStatistics();}}
* {{Iterable<TopicStatistics> getTopicStatistics();}}
* {{Queue getQueue(String name);}}
* {{Iterable<Queue> getQueues();}}
* {{Job addJob(String topic, Map<String, Object> properties);}}
* {{boolean removeJobById(String jobId);}}
* {{void stopJobById(String jobId);}}
* {{JobBuilder createJob(final String topic);}}
* {{Collection<ScheduledJobInfo> getScheduledJobs();}}
* {{Collection<ScheduledJobInfo> getScheduledJobs(String topic, long limit, Map<String, Object>... templates);}}


> Deprecate JobManager methods which allow to manage the queue
> ------------------------------------------------------------
>
>                 Key: SLING-5884
>                 URL: https://issues.apache.org/jira/browse/SLING-5884
>             Project: Sling
>          Issue Type: Task
>          Components: Extensions
>    Affects Versions: Event 4.0.2
>            Reporter: Timothee Maret
>            Assignee: Stefan Egli
>            Priority: Major
>             Fix For: Event API 1.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The {{JobManager}} contains methods which allow to manage the entries in the queue. Those methods such as {{o.a.s.e.j.JobManager#findJobs}} impose a heavy burden on the repository and can cause major runtime issues such as running the instance OOM.
> This issue tracks deprecating those API signatures.
> See also http://sling.markmail.org/message/k3hjqcvnnabsb47j  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)