[jira] [Commented] (TAP5-2562) remove periodic job from PeriodicExecutor by name

2016-09-11 Thread Bob Harner (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15481662#comment-15481662
 ] 

Bob Harner commented on TAP5-2562:
--

There is already the ability to remove a job (via PeriodicJob.cancel(), but the 
part missing is the ability to return a list of jobs by name.

{code}
public List getJobs();
{code}

and

{code}
public List getJobs(String name);
{code}

For Tapestry 5.5 (which will require Java 8) the implementations could be added 
as default methods to the PeriodicExecutor interface to avoid breaking the 
API's backward compatibility, although I suspect few if any apps have custom 
implementations so maybe that's not so important.

> remove periodic job from PeriodicExecutor by name
> -
>
> Key: TAP5-2562
> URL: https://issues.apache.org/jira/browse/TAP5-2562
> Project: Tapestry 5
>  Issue Type: Wish
>  Components: tapestry-ioc
>Affects Versions: 5.4.1
>Reporter: Sven Homburg
>Priority: Minor
>
> it would nice to let us remove a periodic job from executor by the name of 
> the job.



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


[jira] [Commented] (TAP5-2562) remove periodic job from PeriodicExecutor by name

2016-09-06 Thread Sven Homburg (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15466965#comment-15466965
 ] 

Sven Homburg commented on TAP5-2562:


yes, i share your demur.
my suggestion;

public void removeJob(String name) throws RemoveJobException

so we can raise an exception if there more than one job with the same name
or one, if there no job with the given name.

what do you think about?

> remove periodic job from PeriodicExecutor by name
> -
>
> Key: TAP5-2562
> URL: https://issues.apache.org/jira/browse/TAP5-2562
> Project: Tapestry 5
>  Issue Type: Wish
>  Components: tapestry-ioc
>Affects Versions: 5.4.1
>Reporter: Sven Homburg
>Priority: Minor
>
> it would nice to let us remove a periodic job from executor by the name of 
> the job.



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


[jira] [Commented] (TAP5-2562) remove periodic job from PeriodicExecutor by name

2016-09-06 Thread Jochen Kemnade (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15466945#comment-15466945
 ] 

Jochen Kemnade commented on TAP5-2562:
--

Unfortunately, the job name is not necessarily unique. We could however expose 
the job's ID and add {{removeJob(id)}}, but that would probably require us to 
break the API.

> remove periodic job from PeriodicExecutor by name
> -
>
> Key: TAP5-2562
> URL: https://issues.apache.org/jira/browse/TAP5-2562
> Project: Tapestry 5
>  Issue Type: Wish
>  Components: tapestry-ioc
>Affects Versions: 5.4.1
>Reporter: Sven Homburg
>Priority: Minor
>
> it would nice to let us remove a periodic job from executor by the name of 
> the job.



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


[jira] [Commented] (TAP5-2562) remove periodic job from PeriodicExecutor by name

2016-09-06 Thread Sven Homburg (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15466860#comment-15466860
 ] 

Sven Homburg commented on TAP5-2562:


here my idea:

{code:title=PeriodicExecutorImpl.java|borderStyle=solid}
public void removeJob(String name)
{
   Job jobToRemove = null;
   
   for(Job job : jobs)
   {
  if (name.equals(job.getName())
  {
 jobToRemove = job;
break;
  }
   }

  if (jobToRemove != null)
 removeJob(jobToRemove);
}
{code}

> remove periodic job from PeriodicExecutor by name
> -
>
> Key: TAP5-2562
> URL: https://issues.apache.org/jira/browse/TAP5-2562
> Project: Tapestry 5
>  Issue Type: Wish
>  Components: tapestry-ioc
>Affects Versions: 5.4.1
>Reporter: Sven Homburg
>Priority: Minor
>
> it would nice to let us remove a periodic job from executor by the name of 
> the job.



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