Skip to content

Commit 872cbff

Browse files
committed
Deprecate obtainLock method with single id parameter in LockChecker
1 parent c280448 commit 872cbff

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

affinity/src/main/java/net/openhft/affinity/lockchecker/LockChecker.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ public interface LockChecker {
2626

2727
boolean isLockFree(int id);
2828

29+
/**
30+
* Obtain a lock for the given id.
31+
*/
32+
@Deprecated(/* to be removed in x.29 */)
33+
default boolean obtainLock(int id, String metaInfo) throws IOException {
34+
return obtainLock(id, 0, metaInfo);
35+
}
36+
37+
/**
38+
* Obtain a lock for the given id and id2. The id2 is used to distinguish between
39+
* multiple locks for the same core
40+
*/
2941
boolean obtainLock(int id, int id2, String metaInfo) throws IOException;
3042

3143
boolean releaseLock(int id);

0 commit comments

Comments
 (0)