Package com.opengamma.engine.function

Examples of com.opengamma.engine.function.CompiledFunctionRepository


    assertNotNull(definition);
    final FunctionCompilationContext context = new FunctionCompilationContext();
    context.setRawComputationTargetResolver(new DefaultComputationTargetResolver());
    final CompiledFunctionService cfs = new CompiledFunctionService(repo, new CachingFunctionRepositoryCompiler(), context);
    cfs.initialize();
    final CompiledFunctionRepository compiledRepo = cfs.compileFunctionRepository(System.currentTimeMillis());
    assertNotNull(compiledRepo.getDefinition(definition.getUniqueId()));
    final FunctionInvoker invoker = compiledRepo.getInvoker(definition.getUniqueId());
    assertNotNull(invoker);
    assertTrue(invoker instanceof MockEmptyFunction);
    assertSame(definition, invoker);
  }
View Full Code Here


  @Override
  public AvailableOutputs getPortfolioOutputs(Portfolio portfolio, final Instant instant, final Integer maxNodes, final Integer maxPositions) {
    portfolio = preparePortfolio(portfolio, maxNodes, maxPositions);
    final Instant compileInstant = (instant != null ? instant : Instant.now());
    final CompiledFunctionRepository functionRepository = getCompiledFunctionService().compileFunctionRepository(compileInstant);
    return new AvailablePortfolioOutputs(portfolio, functionRepository, getFunctionExclusionGroups(), getMarketDataAvailability(), getWildcardIndicator());
  }
View Full Code Here

  @Override
  public AvailableOutputs getPortfolioOutputs(final UniqueId portfolioId, final Instant instant, final Integer maxNodes, final Integer maxPositions) {
    Portfolio portfolio = getPortfolio(portfolioId);
    portfolio = preparePortfolio(portfolio, maxNodes, maxPositions);
    final Instant compileInstant = (instant != null ? instant : Instant.now());
    final CompiledFunctionRepository functionRepository = getCompiledFunctionService().compileFunctionRepository(compileInstant);
    return new AvailablePortfolioOutputs(portfolio, functionRepository, getFunctionExclusionGroups(), getMarketDataAvailability(), getWildcardIndicator());
  }
View Full Code Here

    private Object readResolve() {
      final EHCacheViewExecutionCache parent = instance(_parent);
      final ViewDefinition viewDefinition = parent.getConfigSource().getConfig(ViewDefinition.class, _viewDefinition);
      final Collection<DependencyGraph> graphs = new ArrayList<DependencyGraph>(_graphs.size());
      final CompiledFunctionRepository functions = parent.getFunctions().compileFunctionRepository(_compilationTime);
      for (DependencyGraphHolder graph : _graphs) {
        graphs.add(graph.get(functions));
      }
      final Portfolio portfolio = (Portfolio) parent.getFunctions().getFunctionCompilationContext().getRawComputationTargetResolver()
          .resolve(new ComputationTargetSpecification(ComputationTargetType.PORTFOLIO, _portfolio), _versionCorrection).getValue();
View Full Code Here

TOP

Related Classes of com.opengamma.engine.function.CompiledFunctionRepository

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.