Ejemplo n.º 1
0
        public JobQueue(IEnumerable<Job> items, 
            int suspendedCount,
            ActivityConfiguration configuration,    
            IEnumerable<ActivityConfiguration> allActivityConfiguration,
            IPersistenceStore persistenceStore,
            IEventStream eventStream,
            IRecoverableAction recoverableAction,
            IJobMutator jobMutator)
        {
            if (items == null) throw new ArgumentNullException("items");
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (allActivityConfiguration == null) throw new ArgumentNullException("allActivityConfiguration");
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (eventStream == null) throw new ArgumentNullException("eventStream");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");
            if (jobMutator == null) throw new ArgumentNullException("JobMutator");

            Configuration = configuration;

            _suspendedCount = suspendedCount;
            _allActivityConfiguration = allActivityConfiguration;
            _persistenceStore = persistenceStore;
            _eventStream = eventStream;
            _recoverableAction = recoverableAction;
            _jobMutator = jobMutator;
            _items = new Queue<Job>(items);
        }
Ejemplo n.º 2
0
        public JobQueueFactory(
            IPersistenceStore persistenceStore,
            IDependableConfiguration configuration,
            IEventStream eventStream,
            IRecoverableAction recoverableAction,
            IJobMutator jobMutator)
        {
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (eventStream == null)
            {
                throw new ArgumentNullException("eventStream");
            }
            if (recoverableAction == null)
            {
                throw new ArgumentNullException("recoverableAction");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }

            _persistenceStore  = persistenceStore;
            _configuration     = configuration;
            _eventStream       = eventStream;
            _recoverableAction = recoverableAction;
            _jobMutator        = jobMutator;
        }
Ejemplo n.º 3
0
        public Scheduler(
            QueueConfiguration queueConfiguration,
            IDependableConfiguration configuration,
            IPersistenceStore persistenceStore,
            Func<DateTime> now,
            IFailedJobQueue failedJobQueue,
            IRecoverableAction recoverableAction,
            IJobRouter router,
            IActivityToContinuationConverter activityToContinuationConverter,
            IEnumerable<IJobPump> jobPumps,
            IJobMutator jobMutator)
        {
            if (queueConfiguration == null) throw new ArgumentNullException("queueConfiguration");
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (now == null) throw new ArgumentNullException("now");
            if (failedJobQueue == null) throw new ArgumentNullException("failedJobQueue");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");
            if (router == null) throw new ArgumentNullException("router");
            if (activityToContinuationConverter == null)
                throw new ArgumentNullException("activityToContinuationConverter");
            if (jobPumps == null) throw new ArgumentNullException("jobPumps");
            if (jobMutator == null) throw new ArgumentNullException("jobMutator");

            _persistenceStore = persistenceStore;
            _now = now;
            _failedJobQueue = failedJobQueue;
            _recoverableAction = recoverableAction;

            _router = router;
            _activityToContinuationConverter = activityToContinuationConverter;
            _jobPumps = jobPumps;
            _jobMutator = jobMutator;
        }
Ejemplo n.º 4
0
        public WaitingForChildrenTransition(IPersistenceStore persistenceStore,
                                            IContinuationDispatcher continuationDispatcher,
                                            IActivityToContinuationConverter activityToContinuationConverter,
                                            IRecoverableAction recoverableAction,
                                            IJobMutator jobMutator)
        {
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (continuationDispatcher == null)
            {
                throw new ArgumentNullException("continuationDispatcher");
            }
            if (activityToContinuationConverter == null)
            {
                throw new ArgumentNullException("activityToContinuationConverter");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }

            _persistenceStore                = persistenceStore;
            _continuationDispatcher          = continuationDispatcher;
            _activityToContinuationConverter = activityToContinuationConverter;
            _recoverableAction               = recoverableAction;
            _jobMutator = jobMutator;
        }
Ejemplo n.º 5
0
        public Dispatcher(IDependencyResolver dependencyResolver,
            IJobCoordinator jobCoordinator, IErrorHandlingPolicy errorHandlingPolicy,
            IMethodBinder methodBinder,
            IEventStream eventStream,
            IRecoverableAction recoverableAction,
            IStatusChanger statusChanger,
            IContinuationLiveness continuationLiveness,
            IExceptionFilterDispatcher exceptionFilterDispatcher,
            IJobRootValidator jobRootValidator)
        {
            if (jobCoordinator == null) throw new ArgumentNullException("jobCoordinator");
            if (dependencyResolver == null) throw new ArgumentNullException("dependencyResolver");
            if (errorHandlingPolicy == null) throw new ArgumentNullException("errorHandlingPolicy");
            if (methodBinder == null) throw new ArgumentNullException("methodBinder");
            if (eventStream == null) throw new ArgumentNullException("eventStream");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");
            if (statusChanger == null) throw new ArgumentNullException("statusChanger");
            if (continuationLiveness == null) throw new ArgumentNullException("continuationLiveness");
            if (exceptionFilterDispatcher == null) throw new ArgumentNullException("exceptionFilterDispatcher");
            if (jobRootValidator == null) throw new ArgumentNullException("jobRootValidator");

            _jobCoordinator = jobCoordinator;
            _dependencyResolver = dependencyResolver;
            _errorHandlingPolicy = errorHandlingPolicy;
            _methodBinder = methodBinder;
            _eventStream = eventStream;
            _recoverableAction = recoverableAction;
            _statusChanger = statusChanger;
            _continuationLiveness = continuationLiveness;
            _exceptionFilterDispatcher = exceptionFilterDispatcher;
            _jobRootValidator = jobRootValidator;
        }
Ejemplo n.º 6
0
        public JobCoordinator(IEventStream eventStream, IRecoverableAction recoverableAction)
        {
            if (eventStream == null) throw new ArgumentNullException("eventStream");

            _eventStream = eventStream;
            _recoverableAction = recoverableAction;
        }
Ejemplo n.º 7
0
        public ContinuationDispatcher(IJobRouter router,
                                      IJobMutator jobMutator,
                                      IPersistenceStore persistenceStore,
                                      IRecoverableAction recoverableAction)
        {
            if (router == null)
            {
                throw new ArgumentNullException("router");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (recoverableAction == null)
            {
                throw new ArgumentNullException("recoverableAction");
            }

            _router            = router;
            _jobMutator        = jobMutator;
            _persistenceStore  = persistenceStore;
            _recoverableAction = recoverableAction;
        }
Ejemplo n.º 8
0
        public ErrorHandlingPolicy(IDependableConfiguration configuration,
                                   IJobCoordinator jobCoordinator,
                                   IStatusChanger statusChanger,
                                   IFailedJobQueue failedJobQueue,
                                   IRecoverableAction recoverableAction)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (jobCoordinator == null)
            {
                throw new ArgumentNullException("jobCoordinator");
            }
            if (statusChanger == null)
            {
                throw new ArgumentNullException("statusChanger");
            }
            if (failedJobQueue == null)
            {
                throw new ArgumentNullException("failedJobQueue");
            }
            if (recoverableAction == null)
            {
                throw new ArgumentNullException("recoverableAction");
            }

            _configuration     = configuration;
            _jobCoordinator    = jobCoordinator;
            _statusChanger     = statusChanger;
            _failedJobQueue    = failedJobQueue;
            _recoverableAction = recoverableAction;
        }
Ejemplo n.º 9
0
        public JobCoordinator(IEventStream eventStream, IRecoverableAction recoverableAction)
        {
            if (eventStream == null)
            {
                throw new ArgumentNullException("eventStream");
            }

            _eventStream       = eventStream;
            _recoverableAction = recoverableAction;
        }
Ejemplo n.º 10
0
        public JobQueue(IEnumerable <Job> items,
                        int suspendedCount,
                        ActivityConfiguration configuration,
                        IEnumerable <ActivityConfiguration> allActivityConfiguration,
                        IPersistenceStore persistenceStore,
                        IEventStream eventStream,
                        IRecoverableAction recoverableAction,
                        IJobMutator jobMutator)
        {
            if (items == null)
            {
                throw new ArgumentNullException("items");
            }
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (allActivityConfiguration == null)
            {
                throw new ArgumentNullException("allActivityConfiguration");
            }
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (eventStream == null)
            {
                throw new ArgumentNullException("eventStream");
            }
            if (recoverableAction == null)
            {
                throw new ArgumentNullException("recoverableAction");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }

            Configuration = configuration;

            _suspendedCount           = suspendedCount;
            _allActivityConfiguration = allActivityConfiguration;
            _persistenceStore         = persistenceStore;
            _eventStream       = eventStream;
            _recoverableAction = recoverableAction;
            _jobMutator        = jobMutator;
            _items             = new Queue <Job>(items);
        }
        public ContinuationDispatcher(IJobRouter router,
            IJobMutator jobMutator,
            IPersistenceStore persistenceStore,
            IRecoverableAction recoverableAction,
            IJobRootValidator jobRootValidator)
        {
            if (router == null) throw new ArgumentNullException("router");
            if (jobMutator == null) throw new ArgumentNullException("JobMutator");
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");

            _router = router;
            _jobMutator = jobMutator;
            _persistenceStore = persistenceStore;
            _recoverableAction = recoverableAction;
            _jobRootValidator = jobRootValidator;
        }
        public WaitingForChildrenTransition(IPersistenceStore persistenceStore,
            IContinuationDispatcher continuationDispatcher,
            IActivityToContinuationConverter activityToContinuationConverter,
            IRecoverableAction recoverableAction,
            IJobMutator jobMutator)
        {
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (continuationDispatcher == null) throw new ArgumentNullException("continuationDispatcher");
            if (activityToContinuationConverter == null)
                throw new ArgumentNullException("activityToContinuationConverter");
            if (jobMutator == null) throw new ArgumentNullException("JobMutator");

            _persistenceStore = persistenceStore;
            _continuationDispatcher = continuationDispatcher;
            _activityToContinuationConverter = activityToContinuationConverter;
            _recoverableAction = recoverableAction;
            _jobMutator = jobMutator;
        }
Ejemplo n.º 13
0
        public ErrorHandlingPolicy(IDependableConfiguration configuration,
            IJobCoordinator jobCoordinator,
            IStatusChanger statusChanger,
            IFailedJobQueue failedJobQueue,
            IRecoverableAction recoverableAction)
        {
            if(configuration == null) throw new ArgumentNullException("configuration");
            if(jobCoordinator == null) throw new ArgumentNullException("jobCoordinator");
            if(statusChanger == null) throw new ArgumentNullException("statusChanger");
            if(failedJobQueue == null) throw new ArgumentNullException("failedJobQueue");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");

            _configuration = configuration;
            _jobCoordinator = jobCoordinator;
            _statusChanger = statusChanger;
            _failedJobQueue = failedJobQueue;
            _recoverableAction = recoverableAction;
        }
Ejemplo n.º 14
0
        public JobQueueFactory(
            IPersistenceStore persistenceStore, 
            IDependableConfiguration configuration,
            IEventStream eventStream,
            IRecoverableAction recoverableAction,
            IJobMutator jobMutator)
        {
            if (persistenceStore == null) throw new ArgumentNullException("persistenceStore");
            if (configuration == null) throw new ArgumentNullException("configuration");
            if (eventStream == null) throw new ArgumentNullException("eventStream");
            if (recoverableAction == null) throw new ArgumentNullException("recoverableAction");
            if (jobMutator == null) throw new ArgumentNullException("jobMutator");

            _persistenceStore = persistenceStore;
            _configuration = configuration;
            _eventStream = eventStream;
            _recoverableAction = recoverableAction;
            _jobMutator = jobMutator;
        }
Ejemplo n.º 15
0
        public Scheduler(
            QueueConfiguration queueConfiguration,
            IDependableConfiguration configuration,
            IPersistenceStore persistenceStore,
            Func <DateTime> now,
            IFailedJobQueue failedJobQueue,
            IRecoverableAction recoverableAction,
            IJobRouter router,
            IActivityToContinuationConverter activityToContinuationConverter,
            IEnumerable <IJobPump> jobPumps,
            IJobMutator jobMutator)
        {
            if (queueConfiguration == null)
            {
                throw new ArgumentNullException("queueConfiguration");
            }
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }
            if (persistenceStore == null)
            {
                throw new ArgumentNullException("persistenceStore");
            }
            if (now == null)
            {
                throw new ArgumentNullException("now");
            }
            if (failedJobQueue == null)
            {
                throw new ArgumentNullException("failedJobQueue");
            }
            if (recoverableAction == null)
            {
                throw new ArgumentNullException("recoverableAction");
            }
            if (router == null)
            {
                throw new ArgumentNullException("router");
            }
            if (activityToContinuationConverter == null)
            {
                throw new ArgumentNullException("activityToContinuationConverter");
            }
            if (jobPumps == null)
            {
                throw new ArgumentNullException("jobPumps");
            }
            if (jobMutator == null)
            {
                throw new ArgumentNullException("JobMutator");
            }

            _persistenceStore = persistenceStore;
            _now               = now;
            _failedJobQueue    = failedJobQueue;
            _recoverableAction = recoverableAction;

            _router = router;
            _activityToContinuationConverter = activityToContinuationConverter;
            _jobPumps   = jobPumps;
            _jobMutator = jobMutator;
        }