/** * Instantiate a {@link QuartzDeadlineManager} based on the fields contained in the {@link Builder}. * <p> * Will assert that the {@link Scheduler}, {@link ScopeAwareProvider}, {@link TransactionManager} and * {@link Serializer} are not {@code null}, and will throw an {@link AxonConfigurationException} if any of them is * {@code null}. * The TransactionManager, ScopeAwareProvider and Serializer will be tied to the Scheduler's context. If this * initialization step fails, this will too result in an AxonConfigurationException. * * @param builder the {@link Builder} used to instantiate a {@link QuartzDeadlineManager} instance */ protected QuartzDeadlineManager(Builder builder) { builder.validate(); this.scheduler = builder.scheduler; this.scopeAwareProvider = builder.scopeAwareProvider; this.transactionManager = builder.transactionManager; this.serializer = builder.serializer; try { initialize(); } catch (SchedulerException e) { throw new AxonConfigurationException("Unable to initialize QuartzDeadlineManager", e); } }
/** * Instantiate a {@link QuartzDeadlineManager} based on the fields contained in the {@link Builder}. * <p> * Will assert that the {@link Scheduler}, {@link ScopeAwareProvider}, {@link TransactionManager} and * {@link Serializer} are not {@code null}, and will throw an {@link AxonConfigurationException} if any of them is * {@code null}. * The TransactionManager, ScopeAwareProvider and Serializer will be tied to the Scheduler's context. If this * initialization step fails, this will too result in an AxonConfigurationException. * * @param builder the {@link Builder} used to instantiate a {@link QuartzDeadlineManager} instance */ protected QuartzDeadlineManager(Builder builder) { builder.validate(); this.scheduler = builder.scheduler; this.scopeAwareProvider = builder.scopeAwareProvider; this.transactionManager = builder.transactionManager; this.serializer = builder.serializer; try { initialize(); } catch (SchedulerException e) { throw new AxonConfigurationException("Unable to initialize QuartzDeadlineManager", e); } }