[seam-issues] [JBoss JIRA] Updated: (SEAMCRON-11) Add java.util.concurrent.TimeUnit attribute on @Every
Peter Royle (JIRA)
jira-events at lists.jboss.org
Thu May 12 20:45:31 EDT 2011
[ https://issues.jboss.org/browse/SEAMCRON-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Royle updated SEAMCRON-11:
--------------------------------
Description:
Idea courtesy of George Gastaldi. This would allow us to replace Second, Minute and Hour with the standard CronEvent for better consistency, without breaking the readability.
public void doStuff(@Observes @Every(SECONDS) CronEvent
Unfortunately there's a couple of teeny tiny hiccups:
- TimeUnit only goes up to SECONDS in JDK 1.5, and I want to support 1.5 so that Seam Cron can be used n the various CDI JavaSE flavors.
- TimeUnit values are pluralised which don't read very well, eg: @Observes @Every(HOURS)
So obviously, we just create our own replacement for TimeUnit. I guess it will have to be ... CronTimeUnit?
I should also note that this flies in the face of the possibility of implementing something like:
@Observes @Every @Nth(5) Minute m
We could maybe do something like this instead?:
@Observes @Every(nth=5, value=MINUTE) CronEvent e
was:
Idea courtesy of George Gastaldi. This would allow us to replace Second, Minute and Hour with the standard CronEvent for better consistency, without breaking the readability.
public void doStuff(@Observes @Every(SECONDS) CronEvent
Unfortunately there's a couple of teeny tiny hiccups:
- TimeUnit only goes up to SECONDS in JDK 1.5, and I want to support 1.5 so that Seam Cron can be used n the various CDI JavaSE flavors.
- TimeUnit values are pluralised which don't read very well, eg: @Observes @Every(HOURS)
So obviously, we just create our own replacement for TimeUnit. I guess it will have to be ... CronTimeUnit?
> Add java.util.concurrent.TimeUnit attribute on @Every
> -----------------------------------------------------
>
> Key: SEAMCRON-11
> URL: https://issues.jboss.org/browse/SEAMCRON-11
> Project: Seam Cron
> Issue Type: Enhancement
> Reporter: Peter Royle
> Assignee: Peter Royle
> Fix For: 3.0.0.Alpha1
>
>
> Idea courtesy of George Gastaldi. This would allow us to replace Second, Minute and Hour with the standard CronEvent for better consistency, without breaking the readability.
> public void doStuff(@Observes @Every(SECONDS) CronEvent
> Unfortunately there's a couple of teeny tiny hiccups:
> - TimeUnit only goes up to SECONDS in JDK 1.5, and I want to support 1.5 so that Seam Cron can be used n the various CDI JavaSE flavors.
> - TimeUnit values are pluralised which don't read very well, eg: @Observes @Every(HOURS)
> So obviously, we just create our own replacement for TimeUnit. I guess it will have to be ... CronTimeUnit?
> I should also note that this flies in the face of the possibility of implementing something like:
> @Observes @Every @Nth(5) Minute m
> We could maybe do something like this instead?:
> @Observes @Every(nth=5, value=MINUTE) CronEvent e
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list