@Override public void unregisterAction(Action action) { for (Artifact artifact : action.getOutputs()) { generatingActionMap.remove(artifact, action); Action otherAction = generatingActionMap.get(artifact); Preconditions.checkState( otherAction == null || (otherAction != action && Actions.canBeShared(action, otherAction)), "%s %s", action, otherAction); } }
@Override @Nullable public Action getGeneratingAction(Artifact artifact) { return generatingActionMap.get(artifact); }