class BuildSessionImpl implements BuildSession {

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

        buildFinishedActions.putIfAbsent(actionGroup + ":" + actionName, action);
    }

}