Commit e752a434 authored by Ard Schrijvers's avatar Ard Schrijvers

CMS-10897 Add a reference to the Lock and Thread in the LockResource

These fields make sense to expose in the LockResource
parent 401c0fb2
......@@ -19,4 +19,15 @@ package org.onehippo.cms7.services.lock;
public interface LockResource extends AutoCloseable {
@Override
void close();
/**
* @return the {@link Lock} for ths {@link LockResource}
*/
Lock getLock();
/**
* @return the {@link Thread} that holds this {@link LockResource} or {@code null} in case the {@link Thread}
* that created this lock has already stopped and been GC-ed
*/
Thread getHolder();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment