org.jboss.cache.Node.isValid()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(97)

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

Node.isValid介绍

[英]Tests if a node reference is still valid. A node reference may become invalid if it has been removed, invalidated or moved, either locally or remotely. If a node is invalid, it should be fetched again from the cache or a valid parent node. Operations on invalid nodes will throw a org.jboss.cache.NodeNotValidException.
[中]测试节点引用是否仍然有效。如果节点引用已在本地或远程删除、失效或移动,则它可能会变得无效。如果节点无效,则应再次从缓存或有效的父节点中获取该节点。无效节点上的操作将抛出一个组织。jboss。隐藏物NodeNotValidException。

代码示例

代码示例来源:origin: org.hibernate/hibernate-jbosscache2

/**
 * Checks for the validity of the root cache node for this region,
 * creating a new one if it does not exist or is invalid, and also
 * ensuring that the root node is marked as resident.  Suspends any 
 * transaction while doing this to ensure no transactional locks are held 
 * on the region root.
 * 
 * TODO remove this once JBCACHE-1250 is resolved.
 */
public void ensureRegionRootExists() {
    if (regionRoot == null || !regionRoot.isValid())
   establishRegionRootNode();
    // Fix up the resident flag
  if (regionRoot != null && regionRoot.isValid() && !regionRoot.isResident())
   regionRoot.setResident(true);
}

代码示例来源:origin: org.hibernate/hibernate-jbosscache

/**
 * Checks for the validity of the root cache node for this region,
 * creating a new one if it does not exist or is invalid, and also
 * ensuring that the root node is marked as resident.  Suspends any 
 * transaction while doing this to ensure no transactional locks are held 
 * on the region root.
 * 
 * TODO remove this once JBCACHE-1250 is resolved.
 */
public void ensureRegionRootExists() {
    if (regionRoot == null || !regionRoot.isValid())
   establishRegionRootNode();
    // Fix up the resident flag
  if (regionRoot != null && regionRoot.isValid() && !regionRoot.isResident())
   regionRoot.setResident(true);
}

代码示例来源:origin: org.hibernate/hibernate-jbosscache2

if (regionRoot != null && regionRoot.isValid()) {
  return;
   if (newRoot == null || !newRoot.isValid()) {

代码示例来源:origin: org.hibernate/hibernate-jbosscache2

if (regionRoot == null || !regionRoot.isValid()) {

代码示例来源:origin: org.hibernate/hibernate-jbosscache

if (regionRoot == null || !regionRoot.isValid()) {

代码示例来源:origin: org.hibernate/hibernate-jbosscache

if (regionRoot != null && regionRoot.isValid()) {
  return;
   if (newRoot == null || !newRoot.isValid()) {

相关文章