*
* @param calcConfName calculation configuration name
* @return a dependency graph with any nodes which have already been satisfied filtered out, not null See {@link #computeDelta} and how it calls {@link #markExecuted}.
*/
protected DependencyGraph createExecutableDependencyGraph(final String calcConfName) {
final FunctionBlacklistQuery blacklist = getViewProcessContext().getFunctionCompilationService().getFunctionCompilationContext().getGraphExecutionBlacklist();
return getDependencyGraph(calcConfName).subGraph(new DependencyNodeFilter() {
@Override
public boolean accept(final DependencyNode node) {
// Market data functions must not be executed
if (node.isMarketDataSourcingFunction()) {
markExecuted(node);
return false;
}
// Everything else should be executed unless it was copied from a previous cycle or matched by the blacklist
final NodeStateFlag state = getNodeState(node);
if (state != null) {
return false;
}
if (blacklist.isBlacklisted(node)) {
markSuppressed(node);
// If the node is suppressed, put values into the cache to indicate this
final Set<ValueSpecification> outputs = node.getOutputValues();
final ViewComputationCache cache = getComputationCache(calcConfName);
if (outputs.size() == 1) {