[jira] Commented: (SLING-1862) Add possibility to get position of a job inside a queue
[ https://issues.apache.org/jira/browse/SLING-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967254#action_12967254 ] Carsten Ziegeler commented on SLING-1862: - Ok, forget my last comment - it's easy to add the sequence number. So, let's talk about the api - currently all querying is done through the JobManager - how do you get your event objects? > Add possibility to get position of a job inside a queue > --- > > Key: SLING-1862 > URL: https://issues.apache.org/jira/browse/SLING-1862 > Project: Sling > Issue Type: New Feature > Components: Extensions >Affects Versions: Extensions Event 3.0.0 >Reporter: Tobias Bocanegra >Assignee: Carsten Ziegeler > Fix For: Extensions Event 3.0.0 > > > would be good, if there was a possibility to determine the position of a job > within a queue. > something like: > int Queue.getPosition(Event) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1862) Add possibility to get position of a job inside a queue
[ https://issues.apache.org/jira/browse/SLING-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967253#action_12967253 ] Carsten Ziegeler commented on SLING-1862: - I'm not sure if it is that easy to generate a sequence number - imagine a cluster setup where such a job can be started (in parallel) on each cluster node - in order for a working sequence number we would need some locking etc. here. > Add possibility to get position of a job inside a queue > --- > > Key: SLING-1862 > URL: https://issues.apache.org/jira/browse/SLING-1862 > Project: Sling > Issue Type: New Feature > Components: Extensions >Reporter: Tobias Bocanegra > > would be good, if there was a possibility to determine the position of a job > within a queue. > something like: > int Queue.getPosition(Event) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1862) Add possibility to get position of a job inside a queue
[ https://issues.apache.org/jira/browse/SLING-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929293#action_12929293 ] Tobias Bocanegra commented on SLING-1862: - for an ordered queue this can easily be implemented using a sequence number for all events. > Add possibility to get position of a job inside a queue > --- > > Key: SLING-1862 > URL: https://issues.apache.org/jira/browse/SLING-1862 > Project: Sling > Issue Type: New Feature > Components: Extensions >Reporter: Tobias Bocanegra > > would be good, if there was a possibility to determine the position of a job > within a queue. > something like: > int Queue.getPosition(Event) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-1862) Add possibility to get position of a job inside a queue
[ https://issues.apache.org/jira/browse/SLING-1862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928769#action_12928769 ] Carsten Ziegeler commented on SLING-1862: - I think this is a rather expensive operation - in addition it would block parts of the queue processing as the internal structures need to be synced/locked You can achieve the same, by querying for all jobs with your desired topic, go through the collection (Iterator) you get and find the result by yourself. This gives you the possibility to query the position for a collection of items in one go. > Add possibility to get position of a job inside a queue > --- > > Key: SLING-1862 > URL: https://issues.apache.org/jira/browse/SLING-1862 > Project: Sling > Issue Type: New Feature > Components: Extensions >Reporter: Tobias Bocanegra > > would be good, if there was a possibility to determine the position of a job > within a queue. > something like: > int Queue.getPosition(Event) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.