Exemplo n.º 1
0
 public void OnNext(IAllocatedEvaluator value)
 {
     value.SubmitTask(TaskConfiguration.ConfigurationModule
                      .Set(TaskConfiguration.Identifier, "1234567")
                      .Set(TaskConfiguration.Task, GenericType <FailTask> .Class)
                      .Build());
 }
Exemplo n.º 2
0
 public void OnNext(IAllocatedEvaluator value)
 {
     value.SubmitTask(TaskConfiguration.ConfigurationModule
                      .Set(TaskConfiguration.Identifier, TaskId)
                      .Set(TaskConfiguration.Task, GenericType <FailEvaluatorTask> .Class)
                      .Set(TaskConfiguration.OnMessage, GenericType <FailEvaluatorTask> .Class)
                      .Build());
 }
Exemplo n.º 3
0
 public void OnNext(IAllocatedEvaluator value)
 {
     // submit the first Task.
     value.SubmitTask(TaskConfiguration.ConfigurationModule
                      .Set(TaskConfiguration.Identifier, "TaskID")
                      .Set(TaskConfiguration.Task, GenericType <TaskStartExceptionTask> .Class)
                      .Set(TaskConfiguration.OnTaskStart, GenericType <TaskStartHandlerWithException> .Class)
                      .Build());
 }
Exemplo n.º 4
0
 public void OnNext(IAllocatedEvaluator value)
 {
     value.SubmitTask(
         TaskConfiguration.ConfigurationModule
         .Set(TaskConfiguration.Identifier, TaskId)
         .Set(TaskConfiguration.Task, GenericType <TestTask> .Class)
         .Set(TaskConfiguration.OnMessage, GenericType <ReceiveTaskMessageExceptionHandler> .Class)
         .Build());
 }
Exemplo n.º 5
0
            public void OnNext(IAllocatedEvaluator value)
            {
                var taskConf = TaskConfiguration.ConfigurationModule
                               .Set(TaskConfiguration.Identifier, ExpectedTaskId)
                               .Set(TaskConfiguration.Task, GenericType <UnhandledThreadExceptionInTaskTestTask> .Class)
                               .Build();

                var shouldThrowSerializableConfig = TangFactory.GetTang().NewConfigurationBuilder()
                                                    .BindNamedParameter <ShouldThrowSerializableException, bool>(
                    GenericType <ShouldThrowSerializableException> .Class, _shouldReceiveSerializableException.ToString())
                                                    .Build();

                value.SubmitTask(Configurations.Merge(taskConf, shouldThrowSerializableConfig));
            }
Exemplo n.º 6
0
        /// <summary>
        /// Submits the HelloRestartTask to the Evaluator.
        /// </summary>
        public void OnNext(IAllocatedEvaluator allocatedEvaluator)
        {
            lock (_lockObj)
            {
                _evaluators.Add(allocatedEvaluator.Id, EvaluatorState.NewAllocated);
            }

            var taskConfiguration = TaskConfiguration.ConfigurationModule
                                    .Set(TaskConfiguration.Identifier, "HelloRestartTask")
                                    .Set(TaskConfiguration.Task, GenericType <HelloRestartTask> .Class)
                                    .Set(TaskConfiguration.OnMessage, GenericType <HelloRestartTask> .Class)
                                    .Set(TaskConfiguration.OnDriverConnectionChanged, GenericType <HelloRestartTask> .Class)
                                    .Build();

            allocatedEvaluator.SubmitTask(taskConfiguration);
        }
Exemplo n.º 7
0
 public void OnNext(IAllocatedEvaluator value)
 {
     value.SubmitTask(_taskConfiguration);
 }