Example #1
0
        protected IContextDefinition RegisterJob <TJob, TJobId, TJobRunner, TJobScheduler>()
            where TJob : IJob <TJobId>
            where TJobId : IJobId
            where TJobRunner : JobRunner <TJob, TJobId>
            where TJobScheduler : JobScheduler <TJobScheduler, TJob, TJobId>
        {
            var manager = new JobManagerDefinition(typeof(TJobRunner), typeof(TJobScheduler), typeof(TJob), typeof(TJobId));

            _jobs.Add(new JobDefinition(typeof(TJob), typeof(TJobId), manager));
            return(this);
        }
Example #2
0
        public IReadOnlyDictionary <IJobManagerDefinition, IActorRef> RegisterEventsScheduler(String contextName)
        {
            var def = new JobManagerDefinition(typeof(PublishEventJobRunner), typeof(PublishEventJobScheduler), typeof(PublishEventJob), typeof(PublishEventJobId));

            return(RegisterJobManagers(new[] { def }, contextName));
        }