class BuildSessionImpl implements BuildSession {

    @Override
    public synchronized void executeOnce(
            @NonNull String actionGroup, @NonNull String actionName, @NonNull Runnable action) {
        Preconditions.checkState(buildState == BuildState.STARTED);

        String actionId = actionGroup + ":" + actionName;
        if (!executedActions.contains(actionId)) {
            executedActions.add(actionId);
            action.run();
        }
    }

}