class DistributedLockWatcher implements LockFactory, ApplicationListener<ContextClosedEvent> {

    @Override
    public DistributedLock getLock(String id) {
        final DistributedLock lock = delegate.getLock(id);
        final WatchedDistributedLock watchedDistributedLock = new WatchedDistributedLock(lock);
        locks.put(watchedDistributedLock.getKey(), watchedDistributedLock);
        return watchedDistributedLock;
    }

    public  DistributedLockWatcher(LockFactory delegate);

}