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); }
public IReadOnlyDictionary <IJobManagerDefinition, IActorRef> RegisterEventsScheduler(String contextName) { var def = new JobManagerDefinition(typeof(PublishEventJobRunner), typeof(PublishEventJobScheduler), typeof(PublishEventJob), typeof(PublishEventJobId)); return(RegisterJobManagers(new[] { def }, contextName)); }