Package com.opengamma.engine.view.execution

Examples of com.opengamma.engine.view.execution.ViewCycleExecutionOptions$Builder


      LocalDate currentDate = startDate;
      while (!currentDate.isAfter(endDate)) {
        if (calendar == null || calendar.isWorkingDay(currentDate)) {
          MarketDataSpecification marketDataSpec = createMarketDataSpec(previousWorkingDate, currentDate, LocalDate.now(executionContext.getValuationClock()));
          if (marketDataSpec != null) {
            ViewCycleExecutionOptions executionOptions = ViewCycleExecutionOptions.builder()
                .setMarketDataSpecification(marketDataSpec)
                .create();
            executionSequence.add(executionOptions);
          }
          previousWorkingDate = currentDate;
View Full Code Here


      // then the manipulator from the previous scenario would be used
      Set<DistinctMarketDataSelector> unusedSelectors = Sets.difference(allSelectors, params.keySet());
      for (DistinctMarketDataSelector unusedSelector : unusedSelectors) {
        params.put(unusedSelector, EmptyFunctionParameters.INSTANCE);
      }
      ViewCycleExecutionOptions scenarioOptions = baseOptions.copy()
          .setFunctionParameters(params)
          .setValuationTime(scenario.getValuationTime())
          .setResolverVersionCorrection(scenario.getResolverVersionCorrection())
          .create();
      options.add(scenarioOptions);
View Full Code Here

                  ViewResultListener listener,
                  ViewProcessor viewProcessor) {
    ViewClient viewClient = viewProcessor.createViewClient(UserPrincipal.getTestUser());
    try {
      Set<DistinctMarketDataSelector> allSelectors = allSelectors();
      ViewCycleExecutionOptions baseOptions =
          ViewCycleExecutionOptions
              .builder()
              .setMarketDataSpecifications(marketDataSpecs)
              .setMarketDataSelector(CompositeMarketDataSelector.of(allSelectors))
              .create();
View Full Code Here

    final TestViewResultListener resultListener = new TestViewResultListener();
    client.setResultListener(resultListener);

    final Instant time0 = Instant.now();
    final ViewCycleExecutionOptions defaultCycleOptions = ViewCycleExecutionOptions.builder().setMarketDataSpecification(MarketData.live()).create();
    final ViewExecutionOptions executionOptions = new ExecutionOptions(ArbitraryViewCycleExecutionSequence.of(time0, time0.plusMillis(10), time0.plusMillis(20), time0.plusMillis(30)), ExecutionFlags
        .none().get(), defaultCycleOptions);

    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), executionOptions);
View Full Code Here

    final TestViewResultListener resultListener = new TestViewResultListener();
    client.setResultListener(resultListener);

    final Instant time0 = Instant.now();
    final ViewCycleExecutionOptions defaultCycleOptions = ViewCycleExecutionOptions.builder().setMarketDataSpecification(MarketData.live()).create();
    final ViewExecutionOptions executionOptions = new ExecutionOptions(ArbitraryViewCycleExecutionSequence.of(time0), ExecutionFlags.none().get(), defaultCycleOptions);

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

    final ViewProcessImpl viewProcess = env.getViewProcess(vp, client.getUniqueId());
View Full Code Here

    @Override
    public void run() {
      boolean compiled = false;
      do {
        ViewCycleExecutionOptions options = _options.getExecutionSequence().poll(_options.getDefaultExecutionOptions());
        if (options == null) {
          _context.workerCompleted();
          return;
        }
        _context.cycleStarted(Mockito.mock(ViewCycleMetadata.class));
View Full Code Here

      graph.addDependencyNode(node);
      previous = node;
    }
    final CompiledViewDefinitionWithGraphsImpl viewEvaluationModel = new CompiledViewDefinitionWithGraphsImpl(VersionCorrection.LATEST, "", viewDefinition, Collections.singleton(graph),
        Collections.<ComputationTargetReference, UniqueId>emptyMap(), new SimplePortfolio("Test Portfolio"), 0);
    final ViewCycleExecutionOptions cycleOptions = ViewCycleExecutionOptions.builder().setValuationTime(Instant.ofEpochMilli(1)).setMarketDataSpecification(new MarketDataSpecification()).create();
    final SingleComputationCycle cycle = new SingleComputationCycle(UniqueId.of("Test", "Cycle1"), computationCycleResultListener, vpc, viewEvaluationModel,
        cycleOptions, VersionCorrection.of(Instant.ofEpochMilli(1), Instant.ofEpochMilli(1)));
    return factory.createExecutor(cycle).execute(graph);
  }
View Full Code Here

    InMemoryViewComputationResultModel model = new InMemoryViewComputationResultModel();
    checkModel(model);
  }

  static void checkModel(InMemoryViewResultModel model) {
    ViewCycleExecutionOptions executionOptions = ViewCycleExecutionOptions.builder()
        .setValuationTime(Instant.ofEpochMilli(400)).create();

    model.setViewCycleExecutionOptions(executionOptions);
    assertEquals(executionOptions, model.getViewCycleExecutionOptions());
    model.setCalculationTime(Instant.ofEpochMilli(500));
View Full Code Here

      ViewProcessor viewProcessor = appContext.getBean("viewProcessor", ViewProcessor.class);

      ViewClient viewClient = viewProcessor.createViewClient(UserPrincipal.getLocalUser());
      MarketDataSpecification marketDataSpec = new FixedHistoricalMarketDataSpecification(s_observationDateTime.toLocalDate());
      ViewCycleExecutionOptions cycleOptions = ViewCycleExecutionOptions.builder().setValuationTime(s_valuationInstant).setMarketDataSpecification(marketDataSpec)
          .setResolverVersionCorrection(VersionCorrection.of(s_versionAsOf, s_correctedTo)).create();
      ViewCycleExecutionSequence executionSequence = ArbitraryViewCycleExecutionSequence.of(cycleOptions);

      ExecutionOptions executionOptions = new ExecutionOptions(executionSequence, ExecutionFlags.none().awaitMarketData().get(), null, null);
View Full Code Here

    List<MarketDataSpecification> actualMarketDataSpecs = fixMarketDataSpecs(requestedMarketDataSpecs);

    // TODO - At this point we need to pick up a shift specification from the UI - for now we'll add the NoOp
    MarketDataSelector marketDataSelector = NoOpMarketDataSelector.getInstance();

    ViewCycleExecutionOptions defaultOptions =
        ViewCycleExecutionOptions
            .builder()
            .setValuationTime(viewRequest.getValuationTime())
            .setMarketDataSpecifications(actualMarketDataSpecs)
            .setMarketDataSelector(marketDataSelector)
View Full Code Here

TOP

Related Classes of com.opengamma.engine.view.execution.ViewCycleExecutionOptions$Builder

Copyright © 2018 www.massapicom. 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.