Package com.opengamma.engine.view.client

Examples of com.opengamma.engine.view.client.ViewClient.waitForCompletion()


      HistoricalMarketDataSpecification marketDataSpecification = MarketData.historical(observationDate, null);

      ViewExecutionOptions executionOptions = ExecutionOptions.batch(valuationTime, marketDataSpecification, null);

      vc.attachToViewProcess(viewDefinitionUniqueId, executionOptions);
      vc.waitForCompletion();
    } finally {
      heartbeatScheduler.shutdown();
    }
  }
View Full Code Here


    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), executionOptions);

    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());
    assertTrue(viewProcess.getState() == ViewProcessState.RUNNING);
    client.waitForCompletion();
    //
    final ArgumentCaptor<ViewCycleMetadata> argument = ArgumentCaptor.forClass(ViewCycleMetadata.class);
    verify(viewResultListenerMock).cycleStarted(argument.capture());

    assertEquals("boo~far", argument.getValue().getViewDefinitionId().toString());
View Full Code Here

        return;
      }
      s_logger.info("Attaching to view process, view def ID {}, execution options {}", viewDefId, executionOptions);
      viewClient.attachToViewProcess(viewDefId, executionOptions, true);
      try {
        viewClient.waitForCompletion();
      } catch (InterruptedException e) {
        s_logger.warn("Interrupted waiting for ViewClient to complete", e);
      }
    } finally {
      viewClient.shutdown();
View Full Code Here

    final ViewClient viewClient = getViewProcessor().createViewClient(UserPrincipal.getTestUser());
    viewClient.attachToViewProcess(viewDefinitionId, ExecutionOptions.singleCycle(Instant.now(), MarketData.live()));
    ViewComputationResultModel result;
    try {
      viewClient.waitForCompletion();
      result = viewClient.getLatestResult();
    } catch (final InterruptedException e) {
      throw new OpenGammaRuntimeException("Interrupted while waiting for payment diary calculations");
    } finally {
      viewClient.shutdown();
View Full Code Here

      _writer.println();
      _writer.println("# " + viewDefinition);

      client.attachToViewProcess(viewDefinition.getUniqueId(), generateExecutionOptions(now));
      try {
        client.waitForCompletion();
      } catch (final InterruptedException e) {
        s_logger.warn("Interrupted while waiting for '{}' to complete" + viewDefinition);
      }
      client.detachFromViewProcess();
View Full Code Here

      }
    });
    vc.setViewCycleAccessSupported(true);
    vc.attachToViewProcess(viewDefinition.getUniqueId(), viewExecutionOptions);

    vc.waitForCompletion();
    vc.pause();
    EngineResourceReference<? extends ViewCycle> cycleReference = null;
    try {
      cycleReference = vc.createLatestCycleReference();
      return marketDataSnapshotter.createSnapshot(vc, cycleReference.get());
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.