public class LockInfo extends Object
Condition对象。
An ownable synchronizer是一个可以由线程专有的同步器 ,并使用AbstractOwnableSynchronizer (或其子类)实现其同步属性。 ReentrantLock和ReentrantReadWriteLock是由平台提供的可拥有同步器的两个例子。
CompositeData ,如from方法中所规定 。
AbstractOwnableSynchronizer , Condition
| Constructor and Description |
|---|
LockInfo(String className, int identityHashCode)
构造一个
LockInfo对象。
|
| Modifier and Type | Method and Description |
|---|---|
static LockInfo |
from(CompositeData cd)
返回由给定的
CompositeData表示的
LockInfo对象。
|
String |
getClassName()
返回锁定对象的类的完全限定名称。
|
int |
getIdentityHashCode()
返回从
System.identityHashCode(java.lang.Object)方法返回的锁对象的标识哈希码。
|
String |
toString()
返回一个锁的字符串表示形式。
|
public LockInfo(String className, int identityHashCode)
className - 锁对象的类的完全限定名称。
identityHashCode - 锁定对象的
identity hash code 。
public String getClassName()
public int getIdentityHashCode()
System.identityHashCode(java.lang.Object)方法返回的锁对象的标识哈希码。
public static LockInfo from(CompositeData cd)
CompositeData表示的LockInfo对象。
给定的CompositeData必须包含以下属性:
Attribute Name Type className java.lang.String identityHashCode java.lang.Integer
cd -
CompositeData代表
LockInfo
LockInfo对象代表cd如果cd不是null ;
null否则。
IllegalArgumentException -如果
cd不代表
LockInfo具有上述属性。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.