|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.lang.management.LockInfo
public class LockInfo
關於鎖 的資訊。鎖可以是內置物件監視器、可擁有同步器 (ownable synchronizer) 或與同步器關聯的 Condition 物件。
可擁有同步器是可以由一個執行緒獨佔的同步器,使用 AbstractOwnableSynchronizer(或其子類別)來實作其同步屬性。ReentrantLock 和 ReentrantReadWriteLock 是平臺提供的兩個可擁有同步器範例。
CompositeData。
AbstractOwnableSynchronizer,
Condition| 建構子摘要 | |
|---|---|
LockInfo(String className,
int identityHashCode)
建構一個 LockInfo 物件。 |
|
| 方法摘要 | |
|---|---|
String |
getClassName()
返回鎖物件的完全限定類別名稱。 |
int |
getIdentityHashCode()
返回從 System.identityHashCode(java.lang.Object) 方法返回的鎖物件的標識雜湊碼。 |
String |
toString()
返回鎖的字元串表示形式。 |
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 建構子詳細資訊 |
|---|
@ConstructorProperties(value={"className","identityHashCode"})
public LockInfo(String className,
int identityHashCode)
className - 鎖物件的完全限定類別名稱。identityHashCode - 鎖物件的標識雜湊碼。| 方法詳細資訊 |
|---|
public String getClassName()
public int getIdentityHashCode()
System.identityHashCode(java.lang.Object) 方法返回的鎖物件的標識雜湊碼。
public String toString()
其中 lock 為鎖物件。lock.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(lock))
Object 中的 toString
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。