diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java b/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java index 9862791..e4e8a56 100644 --- a/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java +++ b/src/main/java/com/amazon/carbonado/repo/map/UpgradableLock.java @@ -1122,6 +1122,13 @@ class UpgradableLock<L> { }
/**
+ * Used by unit tests.
+ */
+ boolean noLocksHeld() {
+ return mState == 0 && mOwner == null && mUpgradeCount == 0 && mWriteCount == 0;
+ }
+
+ /**
* Node class ripped off from AbstractQueuedSynchronizer and modified
* slightly. Read the comments in that class for better understanding.
*/
|