Examples of registerJobInvoker()


Examples of com.opengamma.engine.calcnode.JobDispatcher.registerJobInvoker()

    jobDispatcher.setMaxJobAttempts(1);
    final TestJobResultReceiver result = new TestJobResultReceiver();
    jobDispatcher.dispatchJob(createTestJob(), result);
    assertNull(result.getResult());
    final BlockingJobInvoker blockingInvoker = new BlockingJobInvoker(TIMEOUT);
    jobDispatcher.registerJobInvoker(blockingInvoker);
    CalculationJobResult jobResult = result.waitForResult(2 * TIMEOUT);
    assertNotNull(jobResult);
    assertEquals(blockingInvoker.getInvokerId (), jobResult.getComputeNodeId());
  }

View Full Code Here

Examples of com.opengamma.engine.calcnode.JobDispatcher.registerJobInvoker()

    final TestJobResultReceiver result = new TestJobResultReceiver();
    jobDispatcher.dispatchJob(createTestJob(), result);
    assertNull(result.getResult());
    final BlockingJobInvoker blockingInvoker = new BlockingJobInvoker(2 * TIMEOUT);
    blockingInvoker._isAlive = new AtomicInteger ();
    jobDispatcher.registerJobInvoker(blockingInvoker);
    CalculationJobResult jobResult = result.waitForResult(3 * TIMEOUT);
    assertNotNull(jobResult);
    assertEquals(blockingInvoker.getInvokerId (), jobResult.getComputeNodeId());
    assertTrue (blockingInvoker._isAlive.get () > 0);
  }
View Full Code Here

Examples of com.opengamma.engine.calcnode.JobDispatcher.registerJobInvoker()

    jobDispatcher.setMaxJobAttempts(1);
    final TestJobResultReceiver result = new TestJobResultReceiver();
    jobDispatcher.dispatchJob(createTestJob(), result);
    assertNull(result.getResult());
    final BlockingJobInvoker blockingInvoker = new BlockingJobInvoker(2 * TIMEOUT);
    jobDispatcher.registerJobInvoker(blockingInvoker);
    CalculationJobResult jobResult = result.waitForResult(3 * TIMEOUT);
    assertNotNull(jobResult);
    assertEquals(jobDispatcher.getJobFailureNodeId(), jobResult.getComputeNodeId());
  }
 
View Full Code Here

Examples of com.opengamma.engine.calcnode.JobDispatcher.registerJobInvoker()

    final TestJobResultReceiver result = new TestJobResultReceiver();
    Cancelable job = jobDispatcher.dispatchJob(createTestJob(), result);
    assertNotNull(job);
    assertNull(result.getResult());
    final BlockingJobInvoker blockingInvoker = new BlockingJobInvoker(TIMEOUT);
    jobDispatcher.registerJobInvoker(blockingInvoker);
    assertTrue (job.cancel (false));
    assertTrue (blockingInvoker.isCancelled ());
  }

}
View Full Code Here

Examples of com.opengamma.engine.calcnode.JobDispatcher.registerJobInvoker()

    final JobDispatcher jobDispatcher = new JobDispatcher();
    final Ready initialMessage = new Ready(1, "Test");
    final DirectFudgeConnection conduit = new DirectFudgeConnection(s_fudgeContext);
    final RemoteNodeJobInvoker jobInvoker = new RemoteNodeJobInvoker(Executors.newCachedThreadPool(), initialMessage, conduit.getEnd1(), new InMemoryIdentifierMap(), new FunctionCosts(),
        new DummyFunctionBlacklistQuery(), new DummyFunctionBlacklistMaintainer());
    jobDispatcher.registerJobInvoker(jobInvoker);
    final TestJobResultReceiver resultReceiver = new TestJobResultReceiver();
    final FudgeConnection remoteNode = conduit.getEnd2();
    remoteNode.setFudgeMessageReceiver(new FudgeMessageReceiver() {
      @Override
      public void messageReceived(FudgeContext fudgeContext, FudgeMsgEnvelope msgEnvelope) {
View Full Code Here

Examples of com.opengamma.engine.calcnode.JobDispatcher.registerJobInvoker()

    final JobDispatcher jobDispatcher = new JobDispatcher();
    final Ready initialMessage = new Ready(3, "Test");
    final DirectFudgeConnection conduit = new DirectFudgeConnection(s_fudgeContext);
    final RemoteNodeJobInvoker jobInvoker = new RemoteNodeJobInvoker(Executors.newCachedThreadPool(), initialMessage, conduit.getEnd1(), new InMemoryIdentifierMap(), new FunctionCosts(),
        new DummyFunctionBlacklistQuery(), new DummyFunctionBlacklistMaintainer());
    jobDispatcher.registerJobInvoker(jobInvoker);
    final FudgeConnection remoteNode = conduit.getEnd2();
    final Random rnd = new Random();
    remoteNode.setFudgeMessageReceiver(new FudgeMessageReceiver() {
      @Override
      public void messageReceived(FudgeContext fudgeContext, FudgeMsgEnvelope msgEnvelope) {
View Full Code Here

Examples of com.opengamma.engine.calcnode.JobInvokerRegister.registerJobInvoker()

                  _busy = false;
                  if (_callback != null) {
                    s_logger.debug("re-registering invoker {} with dispatcher", getInvokerId ());
                    final JobInvokerRegister callback = _callback;
                    _callback = null;
                    callback.registerJobInvoker(instance);
                  } else {
                    s_logger.debug("invoker {} completed job without notify", getInvokerId ());
                  }
                }
              }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.