Package com.opengamma.engine.view.execution

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


    vp.start();

    final ViewClient client = vp.createViewClient(ViewProcessorTestEnvironment.TEST_USER);
    final TestViewResultListener resultListener = new TestViewResultListener();
    client.setResultListener(resultListener);
    final ViewCycleExecutionOptions cycleExecutionOptions = ViewCycleExecutionOptions.builder().setValuationTime(Instant.now()).setMarketDataSpecification(MarketData.live()).create();
    final EnumSet<ViewExecutionFlags> flags = ExecutionFlags.none().get();
    final ViewExecutionOptions executionOptions = ExecutionOptions.of(ArbitraryViewCycleExecutionSequence.single(cycleExecutionOptions), flags);
    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), executionOptions);

    resultListener.assertViewDefinitionCompiled(TIMEOUT);
View Full Code Here


    final ViewClient client = vp.createViewClient(ViewProcessorTestEnvironment.TEST_USER);
    final TestViewResultListener resultListener = new TestViewResultListener();
    client.setResultListener(resultListener);
    final Instant valuationTime = Instant.now();
    final ViewCycleExecutionOptions.Builder builder = ViewCycleExecutionOptions.builder().setValuationTime(valuationTime);
    final ViewCycleExecutionOptions cycle1 = builder.setMarketDataSpecification(MarketData.live(SOURCE_1_NAME)).create();
    final ViewCycleExecutionOptions cycle2 = builder.setMarketDataSpecification(MarketData.live(SOURCE_2_NAME)).create();
    final ViewCycleExecutionOptions cycle3 = builder.setMarketDataSpecification(MarketData.live(SOURCE_3_NAME)).create();
    final EnumSet<ViewExecutionFlags> flags = ExecutionFlags.none().runAsFastAsPossible().get();
    final ViewExecutionOptions executionOptions = ExecutionOptions.of(ArbitraryViewCycleExecutionSequence.of(cycle1, cycle2, cycle3), flags);
    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), executionOptions);
    resultListener.assertViewDefinitionCompiled(TIMEOUT);
    resultListener.assertCycleCompleted(TIMEOUT);
View Full Code Here

    final ViewClient client = vp.createViewClient(ViewProcessorTestEnvironment.TEST_USER);
    final TestViewResultListener resultListener = new TestViewResultListener();
    client.setResultListener(resultListener);
    final Instant valuationTime = Instant.now();
    final ViewCycleExecutionOptions.Builder builder = ViewCycleExecutionOptions.builder().setValuationTime(valuationTime);
    final ViewCycleExecutionOptions cycle1 = builder.setMarketDataSpecification(MarketData.live(SOURCE_1_NAME)).create();
    final ViewCycleExecutionOptions cycle2 = builder.setMarketDataSpecification(MarketData.live(SOURCE_2_NAME)).create();
    final ViewCycleExecutionOptions cycle3 = builder.setMarketDataSpecification(MarketData.live(SOURCE_3_NAME)).create();
    final EnumSet<ViewExecutionFlags> flags = ExecutionFlags.none().runAsFastAsPossible().get();
    final ViewExecutionOptions executionOptions = ExecutionOptions.of(ArbitraryViewCycleExecutionSequence.of(cycle1, cycle2, cycle3), flags);
    client.attachToViewProcess(env.getViewDefinition().getUniqueId(), executionOptions);
    resultListener.assertViewDefinitionCompiled(TIMEOUT);
    resultListener.assertCycleCompleted(TIMEOUT);
View Full Code Here

  public void roundTrip() {
    Simulation simulation = new Simulation("test simulation");
    simulation.scenario("scenario1").curve().named("foo").apply().parallelShift(0.1);
    simulation.scenario("scenario2").curve().named("bar").apply().parallelShift(0.1);
    MarketDataSelector selector = CompositeMarketDataSelector.of(simulation.allSelectors());
    ViewCycleExecutionOptions options = ViewCycleExecutionOptions.builder().setMarketDataSelector(selector).create();
    List<ViewCycleExecutionOptions> optionsList = simulation.cycleExecutionOptions(options, simulation.allSelectors());
    ArbitraryViewCycleExecutionSequence sequence = new ArbitraryViewCycleExecutionSequence(optionsList);
    FudgeSerializer serializer = new FudgeSerializer(OpenGammaFudgeContext.getInstance());
    ArbitraryViewCycleExecutionSequenceFudgeBuilder fudgeBuilder = new ArbitraryViewCycleExecutionSequenceFudgeBuilder();
    MutableFudgeMsg msg = fudgeBuilder.buildMessage(serializer, sequence);
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.