Class ReentrantAreaLock
java.lang.Object
ca.spottedleaf.concurrentutil.lock.ReentrantAreaLock
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisHeldByCurrentThread(int x, int y) booleanisHeldByCurrentThread(int centerX, int centerY, int radius) booleanisHeldByCurrentThread(int fromX, int fromY, int toX, int toY) lock(int x, int y) lock(int centerX, int centerY, int radius) lock(int fromX, int fromY, int toX, int toY) tryLock(int x, int y) tryLock(int centerX, int centerY, int radius) tryLock(int fromX, int fromY, int toX, int toY) voidunlock(ReentrantAreaLock.Node node)
-
Field Details
-
coordinateShift
public final int coordinateShift
-
-
Constructor Details
-
ReentrantAreaLock
public ReentrantAreaLock(int coordinateShift)
-
-
Method Details
-
isHeldByCurrentThread
public boolean isHeldByCurrentThread(int x, int y) -
isHeldByCurrentThread
public boolean isHeldByCurrentThread(int centerX, int centerY, int radius) -
isHeldByCurrentThread
public boolean isHeldByCurrentThread(int fromX, int fromY, int toX, int toY) -
tryLock
-
tryLock
-
tryLock
-
lock
-
lock
-
lock
-
unlock
-