com.hp.hpl.jena.rdf.model.Model.getLock()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(132)

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

Model.getLock介绍

[英]Get the model lock for this model. See also the convenience operations enterCriticalSection and leaveCriticalSection.
[中]获取此模型的模型锁。另请参见便利操作enterCriticalSection和leaveCriticalSection。

代码示例

代码示例来源:origin: fr.inria.eventcloud/eventcloud-api

/**
 * {@inheritDoc}
 */
@Override
public Lock getLock() {
  return super.object.getLock();
}

代码示例来源:origin: bio2rdf/bio2rdf-scripts

public Lock getLock() {
  return model.getLock();
}

代码示例来源:origin: epimorphics/elda

@Override public Lock getLock() 
  { return model.getLock(); }
}

代码示例来源:origin: org.appdapter/org.appdapter.bundle.debug

private static Object getLock(Object obj) {
  if (obj == null)
    return null;
  if (obj instanceof Component) {
    return ((Component) obj).getTreeLock();
  }
  if (obj instanceof Model) {
    // this is incorrect but is an exmple
    return ((Model) obj).getLock();
  }
  return null;
}

代码示例来源:origin: epimorphics/elda

@Override public Lock getLock() {
  return source == null ? sourceSet.getLock() : source.getLock();
}

代码示例来源:origin: org.appdapter/org.appdapter.lib.gui

public void inModelLock(boolean readLockRequested, VoidFunc1 runnable) {
  Lock mlock = null;
  Model currentModel = this.currentModel;
  if (currentModel != null) {
    mlock = currentModel.getLock();
  }
  try {
    this.weAreEditingTheModel = true;
    if (mlock != null)
      mlock.enterCriticalSection(readLockRequested);
    runnable.call(currentModel);
  } finally {
    if (mlock != null)
      mlock.leaveCriticalSection();
    this.weAreEditingTheModel = false;
  }
}

相关文章

Model类方法