class BackgroundActionRegistry extends Collection<BackgroundAction> implements BackgroundActionListener {

    @Override
    public synchronized void cancel(final BackgroundAction action) {
        if(action.isRunning()) {
            log.debug(String.format("Skip removing action %s currently running", action));
        }
        else {
            this.remove(action);
        }
    }

    public  BackgroundActionRegistry();

}