public boolean registerLockAcquisition(ApplicationInstanceReference application, Runnable unlock) {
        if (parent.isPresent()) {
            return parent.get().registerLockAcquisition(application, unlock);
        }

        if (!largeLocks) {
            return false;
        }

        if (locks.containsKey(application)) {
            unlock.run();
            throw new IllegalStateException("Application " + application + " was already associated with a lock");
        }

        locks.put(application, unlock);

        return true;
    }
Returns true if large locks is enabled in the root context, and in case the unlock callback
will be invoked when the root context is closed.
orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorContext.java