Example usage for java.util.concurrent.locks ReentrantLock hashCode

List of usage examples for java.util.concurrent.locks ReentrantLock hashCode

Introduction

In this page you can find the example usage for java.util.concurrent.locks ReentrantLock hashCode.

Prototype

@HotSpotIntrinsicCandidate
public native int hashCode();

Source Link

Document

Returns a hash code value for the object.

Usage

From source file:Main.java

private static String getLockInfo(ReentrantLock lock) {
    String lockid = "Lock@" + Integer.toHexString(lock.hashCode());
    return "lock " + lockid + " held=" + lock.getHoldCount() + " isHeldMe=" + lock.isHeldByCurrentThread()
            + " hasQueueThreads=" + lock.hasQueuedThreads();
}