public PingCommandHandler(string nodeId, MasterDataRepository data, JobManager jobManager, IClusterMessageSender sender)
 {
     _nodeId     = nodeId;
     _data       = data;
     _jobManager = jobManager;
     _sender     = sender;
 }
示例#2
0
 protected StitchCommandHandler(MasterDataRepository data, JobManager jobManager, IStitchRequestHandler stitches, IClusterMessageSender sender)
 {
     _stitches   = stitches;
     _data       = data;
     _jobManager = jobManager;
     _sender     = sender;
 }
 protected StitchGroupCommandHandler(string nodeId, MasterDataRepository data, JobManager jobManager, IStitchRequestHandler stitches, IClusterMessageSender sender)
 {
     _stitches   = stitches;
     _data       = data;
     _jobManager = jobManager;
     _sender     = sender;
     _nodeId     = nodeId;
 }
示例#4
0
        public MasterService(CrossStitchCore core, IModuleLog log, MasterDataRepository data, IStitchRequestHandler stitches, IClusterMessageSender clusterSender)
        {
            _core          = core;
            _log           = log;
            _data          = data;
            _stitches      = stitches;
            _clusterSender = clusterSender;
            _clusterZones  = new string[0];
            _jobManager    = new JobManager(_core.MessageBus, _data, _log);

            _commandHandlers = new Dictionary <CommandType, ICommandHandler>
            {
                { CommandType.Ping, new PingCommandHandler(_core.NodeId, data, _jobManager, _clusterSender) },
                { CommandType.StartStitchInstance, new StartStitchCommandHandler(data, _jobManager, stitches, _clusterSender) },
                { CommandType.StopStitchInstance, new StopStitchCommandHandler(data, _jobManager, stitches, _clusterSender) },
                { CommandType.RemoveStitchInstance, new RemoveStitchCommandHandler(data, _jobManager, stitches, _clusterSender) },
                { CommandType.StartStitchGroup, new StartAllStitchGroupCommandHandler(core.NodeId, data, _jobManager, stitches, _clusterSender) },
                { CommandType.StopStitchGroup, new StopAllStitchGroupCommandHandler(core.NodeId, data, _jobManager, stitches, _clusterSender) }
            };
        }
 public RemoveStitchCommandHandler(MasterDataRepository data, JobManager jobManager, IStitchRequestHandler stitches, IClusterMessageSender sender)
     : base(data, jobManager, stitches, sender)
 {
 }
 public StopAllStitchGroupCommandHandler(string nodeId, MasterDataRepository data, JobManager jobManager, IStitchRequestHandler stitches, IClusterMessageSender sender)
     : base(nodeId, data, jobManager, stitches, sender)
 {
 }