Package com.redwood.scheduler.api.uow
Class SchedulerSessionUnitOfWorkManager
- java.lang.Object
- 
- com.redwood.scheduler.api.uow.SchedulerSessionUnitOfWorkManager
 
- 
 public final class SchedulerSessionUnitOfWorkManager extends Object Unit of work manager for work performed in a SchedulerSession.
- 
- 
Constructor SummaryConstructors Constructor Description SchedulerSessionUnitOfWorkManager(SchedulerSessionSource newSource)Create a new unit of work manager using the specified source
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Exception>
 voidperform(SchedulerSessionUnitOfWork<T> uow)Execute a unit of work.<T extends Exception>
 voidperform(SchedulerSessionUnitOfWork<T> uow, int maxRetries, int maxSpins)Execute a unit of work.static voidsetPersistAllowedHelper(PersistAllowedHelper newHelper)
 
- 
- 
- 
Constructor Detail- 
SchedulerSessionUnitOfWorkManagerpublic SchedulerSessionUnitOfWorkManager(SchedulerSessionSource newSource) Create a new unit of work manager using the specified source- Parameters:
- newSource- the source.
 
 
- 
 - 
Method Detail- 
performpublic <T extends Exception> void perform(SchedulerSessionUnitOfWork<T> uow) throws com.redwood.scheduler.api.exception.SchedulerAPIPersistenceException, T extends Exception Execute a unit of work.- Parameters:
- uow- The object to use to perform the work. Generic in the type of Exception its performWork method it throws. See- SchedulerSessionUnitOfWorkfor the problems with using a raw type here.
- Throws:
- com.redwood.scheduler.api.exception.SchedulerAPIPersistenceException- if the persist fails maxretries times, then the last thrown exception will be rethrown
- T- if the underlying unit of work throws an exception.
- T extends Exception
 
 - 
performpublic <T extends Exception> void perform(SchedulerSessionUnitOfWork<T> uow, int maxRetries, int maxSpins) throws com.redwood.scheduler.api.exception.SchedulerAPIPersistenceException, T extends Exception Execute a unit of work. If this thread is interrupted while a unit of work is underway, the unit of work proceeds until either completion or the number of retries is exhausted, at which point the most-recent persist() exception is thrown.- Parameters:
- uow- The object to use to perform the work. Generic in the type of Exception its performWork method it throws. See- SchedulerSessionUnitOfWorkfor the problems with using a raw type here.
- maxRetries- The total number of times to retry.
- maxSpins- The number of times to retry without pausing in between.
- Throws:
- com.redwood.scheduler.api.exception.SchedulerAPIPersistenceException- if the persist fails maxretries times, then the last thrown exception will be rethrown
- T- if the underlying unit of work throws an exception.
- T extends Exception
 
 - 
setPersistAllowedHelperpublic static void setPersistAllowedHelper(PersistAllowedHelper newHelper) 
 
- 
 
-