|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openeai.OpenEaiObject
org.openeai.afa.ScheduleIdStoreImpl
org.openeai.afa.DbScheduleIdStore
public class DbScheduleIdStore
This maintains a list of all Schedules that have been executed by a given ScheduledApp. The Schedule is responsible for clearing the list of executed schedules when the day changes (12am). As a Schedule is executed, its Schedule Id is added to this store so the Schedule won't execute more than once during a 24 hour period. Additionally, this store is persisted to a configurable location so the store survives application starting and stopping.
This implementation, supports storing and loading schedule ids from a database. The configuration information for the repository is specified in the ScheduledAppConfig element.
Schedule,
FileScheduleIdStore,
ScheduledApp,
ScheduledAppConfig| Field Summary |
|---|
| Fields inherited from class org.openeai.OpenEaiObject |
|---|
logger |
| Constructor Summary | |
|---|---|
DbScheduleIdStore()
|
|
| Method Summary | |
|---|---|
void |
add(java.lang.String scheduleId)
Adds a Schedule Id to this store. |
boolean |
contains(java.lang.String scheduleId)
Determines if a particular Schedule Id exists in this store. |
void |
init(AppConfig aConfig)
|
void |
load()
Loads any previously ran schedule ids into memory when the application starts. |
void |
remove(java.lang.String scheduleId)
Removes a specific schedule id from the repository that has an id equal to the schedule id passed in. |
void |
removeSchedulesLike(java.lang.String schedulePattern)
Removes all schedule ids from the repository that have an id containing the pattern passed in. |
| Methods inherited from class org.openeai.afa.ScheduleIdStoreImpl |
|---|
getAppConfig, getScheduleIds, setAppConfig, setScheduleIds |
| Methods inherited from class org.openeai.OpenEaiObject |
|---|
getAppName, getDebug, getFromAddr, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setAppName, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DbScheduleIdStore()
| Method Detail |
|---|
public final void init(AppConfig aConfig)
throws ScheduleIdStoreException
init in interface ScheduleIdStoreScheduleIdStoreException
public final void load()
throws ScheduleIdStoreException
load in interface ScheduleIdStoreScheduleIdStoreException
public final void removeSchedulesLike(java.lang.String schedulePattern)
throws ScheduleIdStoreException
removeSchedulesLike in interface ScheduleIdStoreschedulePattern - String schedulePattern (normally, the app name and the day name)
ScheduleIdStoreException
public final void remove(java.lang.String scheduleId)
throws ScheduleIdStoreException
remove in interface ScheduleIdStorescheduleId - (normally, the app name and the day name and the time (hour/minute))
ScheduleIdStoreException
public final void add(java.lang.String scheduleId)
throws ScheduleIdStoreException
add in interface ScheduleIdStorescheduleId - String the schedule id to be added to the store.
ScheduleIdStoreException
public boolean contains(java.lang.String scheduleId)
throws ScheduleIdStoreException
contains in interface ScheduleIdStorecontains in class ScheduleIdStoreImplScheduleIdStoreException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||