本文整理汇总了Java中java.lang.management.LockInfo.getClassName方法的典型用法代码示例。如果您正苦于以下问题:Java LockInfo.getClassName方法的具体用法?Java LockInfo.getClassName怎么用?Java LockInfo.getClassName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.lang.management.LockInfo
的用法示例。
在下文中一共展示了LockInfo.getClassName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LocalLockInfo
import java.lang.management.LockInfo; //导入方法依赖的package包/类
public LocalLockInfo(Serializable locatility, LockInfo sync) {
super();
this.locatility = locatility;
// LockInfo and Monitor info aren't serializable, so copy the information from
// them. For backwards compatibility, use the LI class which is used
// in older versions of gemfire.
if (sync instanceof MonitorInfo) {
this.info = new LI(sync.getClassName(), sync.getIdentityHashCode(),
((MonitorInfo) sync).getLockedStackFrame());
} else {
this.info = new LI(sync.getClassName(), sync.getIdentityHashCode());
}
}
示例2: checkLockInfo
import java.lang.management.LockInfo; //导入方法依赖的package包/类
private static void checkLockInfo(LockInfo li)
throws Exception {
if (!li.getClassName().equals(lockInfo.getClassName())) {
throw new RuntimeException("Class Name = " +
li.getClassName() + " expected = " + lockInfo.getClassName());
}
if (li.getIdentityHashCode() != lockInfo.getIdentityHashCode()) {
throw new RuntimeException("Class Name = " +
li.getIdentityHashCode() + " expected = " +
lockInfo.getIdentityHashCode());
}
}
示例3: getLockInfo
import java.lang.management.LockInfo; //导入方法依赖的package包/类
@Override
public LI getLockInfo(ThreadInfo threadInfo) {
LockInfo lockInfo= threadInfo.getLockInfo();
if(lockInfo == null) {
return null;
}
return new LI(lockInfo.getClassName(), lockInfo.getIdentityHashCode());
}
示例4: format
import java.lang.management.LockInfo; //导入方法依赖的package包/类
private String format(LockInfo l) {
if (l != null) {
return l.getClassName() + " (" + hex(l.getIdentityHashCode()) + ")";
}
else {
return "<unknown>";
}
}
示例5: printLock
import java.lang.management.LockInfo; //导入方法依赖的package包/类
private void printLock(StringBuilder sb, LockInfo lock) {
String id = Integer.toHexString(lock.getIdentityHashCode());
String className = lock.getClassName();
sb.append("<").append(id).append("> (a ").append(className).append(")"); // NOI18N
}
示例6: printLock
import java.lang.management.LockInfo; //导入方法依赖的package包/类
private void printLock(StringBuilder sb,LockInfo lock) {
String id = Integer.toHexString(lock.getIdentityHashCode());
String className = lock.getClassName();
sb.append("<").append(id).append("> (a ").append(className).append(")"); // NOI18N
}
示例7: getSynchronizer
import java.lang.management.LockInfo; //导入方法依赖的package包/类
static @Nonnull ThreadLock getSynchronizer(final LockInfo info) {
return new ThreadLock(info.getClassName(), info.getIdentityHashCode());
}