Package com.opengamma.engine.function.exclusion

Examples of com.opengamma.engine.function.exclusion.FunctionExclusionGroups


    builder.addTarget(helper.getRequirement1Foo());
    return builder.getDependencyGraph();
  }

  public void noGroups() {
    final DependencyGraph graph = test(new FunctionExclusionGroups() {

      @Override
      public FunctionExclusionGroup getExclusionGroup(final FunctionDefinition function) {
        return null;
      }
View Full Code Here


    final CompiledFunctionService compiledFunctionService = appContext.getBean(CompiledFunctionService.class);
    final ComponentInfo infoCFS = new ComponentInfo(CompiledFunctionService.class, getClassifier());
    repo.registerComponent(infoCFS, compiledFunctionService);
    final ComponentInfo infoFR = new ComponentInfo(FunctionRepository.class, getClassifier());
    repo.registerComponent(infoFR, compiledFunctionService.getFunctionRepository());
    final FunctionExclusionGroups functionExclusionGroups = appContext.getBean(FunctionExclusionGroups.class);
    repo.registerComponent(new ComponentInfo(FunctionExclusionGroups.class, getClassifier()), functionExclusionGroups);
    final FunctionResolver functionResolver = appContext.getBean(FunctionResolver.class);
    repo.registerComponent(new ComponentInfo(FunctionResolver.class, getClassifier()), functionResolver);
    if (isPublishRest()) {
      repo.getRestComponents().publishResource(new DataFunctionRepositoryResource(compiledFunctionService.getFunctionRepository()));
View Full Code Here

  }

  private ViewCompilationServices createViewCompilationServices() {
    final CompiledFunctionService cfs = _repo.getInstance(CompiledFunctionService.class, "main");
    final FunctionResolver functionResolver = _repo.getInstance(FunctionResolver.class, "main");
    final FunctionExclusionGroups functionExclusionGroups = _repo.getInstance(FunctionExclusionGroups.class, "main");
    final DependencyGraphBuilderFactory dependencyGraphBuilder = new DependencyGraphBuilderFactory();
    dependencyGraphBuilder.setFunctionExclusionGroups(functionExclusionGroups);
    configureDependencyGraphBuilder(dependencyGraphBuilder);
    final MarketDataAvailabilityProvider mdap = new OptimisticMarketDataAvailabilityFilter().withProvider(new DefaultMarketDataAvailabilityProvider());
    return new ViewCompilationServices(mdap, functionResolver, cfs.getFunctionCompilationContext(), cfs.getExecutorService(), dependencyGraphBuilder);
View Full Code Here

  protected IterationBaseStep getIterationBase() {
    return _base;
  }

  protected Collection<FunctionExclusionGroup> getFunctionExclusion(final GraphBuildingContext context, final CompiledFunctionDefinition function) {
    final FunctionExclusionGroups groups = context.getFunctionExclusionGroups();
    if (groups == null) {
      return null;
    }
    final FunctionExclusionGroup functionExclusion = groups.getExclusionGroup(function.getFunctionDefinition());
    if (functionExclusion == null) {
      return getTask().getFunctionExclusion();
    }
    final Collection<FunctionExclusionGroup> parentExclusion = getTask().getFunctionExclusion();
    if (parentExclusion != null) {
      return groups.withExclusion(parentExclusion, functionExclusion);
    } else {
      return Collections.singleton(functionExclusion);
    }
  }
View Full Code Here

    }
    final Triple<ParameterizedFunction, ValueSpecification, Collection<ValueSpecification>> resolvedFunction = getFunctions().next();
    if (getTask().getFunctionExclusion() != null) {
      final Collection<FunctionExclusionGroup> groups = getTask().getFunctionExclusion();
      if (groups != null) {
        final FunctionExclusionGroups util = context.getFunctionExclusionGroups();
        final FunctionExclusionGroup exclusion = util.getExclusionGroup(resolvedFunction.getFirst().getFunction().getFunctionDefinition());
        if ((exclusion != null) && util.isExcluded(exclusion, groups)) {
          s_logger.debug("Ignoring {} from exclusion group {}", resolvedFunction, exclusion);
          getTask().setRecursionDetected();
          setRunnableTaskState(this, context);
          return true;
        }
View Full Code Here

TOP

Related Classes of com.opengamma.engine.function.exclusion.FunctionExclusionGroups

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.