Package com.opengamma.engine.function

Examples of com.opengamma.engine.function.CompiledFunctionService$StaticFunctionRepository


  public void errorInvocation() {
    final IdentifierMap identifierMap = new InMemoryIdentifierMap ();
    final DirectFudgeConnection conduit = new DirectFudgeConnection(s_fudgeContext);
    final CollectingFudgeMessageReceiver messages = new CollectingFudgeMessageReceiver();
    conduit.getEnd2().setFudgeMessageReceiver(messages);
    final RemoteNodeClient client = new RemoteNodeClient(conduit.getEnd1(), new CompiledFunctionService (new InMemoryFunctionRepository (), new CachingFunctionRepositoryCompiler(), new FunctionCompilationContext ()), new InMemoryIdentifierMap (), new FunctionInvocationStatisticsSender ());
    final SimpleCalculationNode failingNode = new TestCalculationNode() {
     
      @Override
      public CalculationJobResult executeJob(CalculationJob job) {
        throw new OpenGammaRuntimeException ("Remote node not working");
View Full Code Here


  }

  private EHCacheViewExecutionCache createCache() {
    final ConfigSource configSource = Mockito.mock(ConfigSource.class);
    Mockito.when(configSource.getConfig(ViewDefinition.class, UniqueId.of("View", "0", "V"))).thenReturn(createViewDefinition());
    final CompiledFunctionService functions = new CompiledFunctionService(createFunctionRepository(), new LazyFunctionRepositoryCompiler(), createFunctionCompilationContext());
    functions.initialize();
    return new EHCacheViewExecutionCache(_cacheManager, configSource, functions);
  }
View Full Code Here

    final FunctionCompilationContext context = new FunctionCompilationContext();
    final ComputationTargetResolver targetResolver = new MapComputationTargetResolver();
    context.setRawComputationTargetResolver(targetResolver);
    context.setComputationTargetResolver(targetResolver.atVersionCorrection(VersionCorrection.of(now, now)));
    builder.setCompilationContext(context);
    final CompiledFunctionService compilationService = new CompiledFunctionService(_functionRepo, new CachingFunctionRepositoryCompiler(), context);
    compilationService.initialize();
    final DefaultFunctionResolver resolver;
    if (prioritizer != null) {
      resolver = new DefaultFunctionResolver(compilationService, prioritizer);
    } else {
      resolver = new DefaultFunctionResolver(compilationService);
View Full Code Here

    Mockito.when(positionSource.getPosition(POSITION.getUniqueId())).thenReturn(POSITION);
    Mockito.when(positionSource.getPosition(Mockito.eq(POSITION.getUniqueId().getObjectId()), Mockito.any(VersionCorrection.class))).thenReturn(POSITION);
    final FunctionCompilationContext context = new FunctionCompilationContext();
    context.setRawComputationTargetResolver(new DefaultComputationTargetResolver(securitySource, positionSource));
    context.setComputationTargetResolver(context.getRawComputationTargetResolver().atVersionCorrection(VersionCorrection.of(Instant.now(), Instant.now())));
    final CompiledFunctionService cfs = new CompiledFunctionService(functionRepo, new CachingFunctionRepositoryCompiler(), context);
    cfs.initialize();
    final FunctionResolver functionResolver = new DefaultFunctionResolver(cfs);
    final CompiledFunctionResolver compiledFunctionResolver = functionResolver.compile(Instant.now());
    final ComputationTargetResults results = new ComputationTargetResults(compiledFunctionResolver.getAllResolutionRules());
    results.setFunctionCompilationContext(context);
    return results;
View Full Code Here

TOP

Related Classes of com.opengamma.engine.function.CompiledFunctionService$StaticFunctionRepository

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.