org.wildfly.common.Assert.assertHoldsLock()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.wildfly.common.Assert.assertHoldsLock()方法的一些代码示例,展示了Assert.assertHoldsLock()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assert.assertHoldsLock()方法的具体详情如下:
包路径:org.wildfly.common.Assert
类名称:Assert
方法名:assertHoldsLock

Assert.assertHoldsLock介绍

[英]Assert that the given monitor is held by the current thread. Use a standard assertion failure message if it is not. Only runs if assert is enabled.
[中]断言给定的监视器由当前线程持有。如果不是,请使用标准的断言失败消息。仅在启用assert时运行。

代码示例

代码示例来源:origin: wildfly/wildfly

Assert.assertHoldsLock(lock);
final State state = this.state;
switch (state) {

代码示例来源:origin: wildfly/wildfly

private void runWriteTask() {
  Assert.assertHoldsLock(lock);
  if (pooledBuffer != null) {
    pooledBuffer.getBuffer().flip();
  }
  state |= FLAG_WRITING;
  channel.getWriteSetter().set(channelListener);
  channel.wakeupWrites();
}

代码示例来源:origin: wildfly/wildfly

Assert.assertHoldsLock(lock);
final State oldState = this.state;
if (log.isTraceEnabled()) {

代码示例来源:origin: org.jboss.eap/wildfly-client-all

Assert.assertHoldsLock(lock);
final State state = this.state;
switch (state) {

代码示例来源:origin: wildfly/jboss-ejb-client

Assert.assertHoldsLock(lock);
final State state = this.state;
switch (state) {

代码示例来源:origin: org.wildfly.wildfly-http-client/wildfly-http-client-common

private void runWriteTask() {
  Assert.assertHoldsLock(lock);
  if (pooledBuffer != null) {
    pooledBuffer.getBuffer().flip();
  }
  state |= FLAG_WRITING;
  channel.getWriteSetter().set(channelListener);
  channel.wakeupWrites();
}

代码示例来源:origin: wildfly/jboss-ejb-client

Assert.assertHoldsLock(lock);
final State oldState = this.state;
if (log.isTraceEnabled()) {

代码示例来源:origin: org.jboss.eap/wildfly-client-all

private void runWriteTask() {
  Assert.assertHoldsLock(lock);
  if (pooledBuffer != null) {
    pooledBuffer.getBuffer().flip();
  }
  state |= FLAG_WRITING;
  channel.getWriteSetter().set(channelListener);
  channel.wakeupWrites();
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

Assert.assertHoldsLock(lock);
final State oldState = this.state;
if (log.isTraceEnabled()) {

相关文章