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

Carsten Ziegeler resolved SLING-1687.
-------------------------------------

    Resolution: Fixed

Added a new methods which in revision which return a JobsIterator - if the 
query returns a size this will be available through the iterator.
Skipping jobs is possible as well.
Even if a required classloader is not available, the job will be returned - 
just without the props that can't be loaded! If only the size of the iterator 
is queried or the iterator is only used partially, the close method must be 
called to free the session.

> JobStatusProvider should lazy load events when returning
> --------------------------------------------------------
>
>                 Key: SLING-1687
>                 URL: https://issues.apache.org/jira/browse/SLING-1687
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>    Affects Versions: Extensions Event 2.3.0
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Extensions Event 2.4.0
>
>
> The current implementation of the job status provider does a query, then 
> loads all jobs and returns a list.
> If you just want to know how many jobs are available or just want to return 
> the first X jobs, the implementation is too expansive.
> One solution would be to return a kind of range iterator instead of a list 
> and load jobs on demand. There are two potential problems:
> - if the jcr query does not return a count, we can't return a count either 
> without going through the hole result set
> - it might be that a job can't be loaded because of missing classes; in this 
> cases the job count from the query result is higher than the count of the 
> jobs that get processed. I think we can neglect this 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to