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

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

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

Node.getFqn介绍

[英]Returns the Fqn which represents the location of this Node in the cache structure. The Fqn returned is absolute.
[中]返回表示此节点在缓存结构中的位置的Fqn。返回的Fqn是绝对的。

代码示例

代码示例来源:origin: org.jboss.cache/jbosscache-core

private Fqn getFqn(Object o)
{
 if (o instanceof Node) return ((Node) o).getFqn();
 if (o instanceof InternalNode) return ((InternalNode) o).getFqn();
 throw new IllegalArgumentException();
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

private Fqn getFqn(Object o)
{
 if (o instanceof Node) return ((Node) o).getFqn();
 if (o instanceof InternalNode) return ((InternalNode) o).getFqn();
 throw new IllegalArgumentException();
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

private Set<Node> retainInternalNodes(Node target)
{
 Set<Node> result = new HashSet<Node>();
 Fqn targetFqn = target.getFqn();
 for (Fqn internalFqn : internalFqns)
 {
   if (internalFqn.isChildOf(targetFqn))
   {
    Node internalNode = getInternalNode(target, internalFqn);
    if (internalNode != null)
    {
      result.add(internalNode);
    }
   }
 }
 return result;
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

private Set<Fqn> retainInternalNodes(Fqn target)
{
 Set<Fqn> result = new HashSet<Fqn>();
 for (Fqn internalFqn : internalFqns)
 {
   if (internalFqn.isChildOf(target))
   {
    prepareContextOptions();
    Node node = getInternalNode(cache.getNode(target), internalFqn);
    if (node != null)
    {
      result.add(node.getFqn());
    }
   }
 }
 return result;
}

代码示例来源:origin: org.mobicents.ha.javax.sip/restcomm-jain-sip-jboss5

public void evictDialog(String dialogId) {
  cache.evict(Fqn.fromElements(dialogRootNode.getFqn(), Fqn.fromString(dialogId)));
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

private void integrateRetainedNodes(NodeSPI target)
{
 Set<Node> retainedNodes = retainInternalNodes(target);
 Fqn rootFqn = target.getFqn();
 for (Node retained : retainedNodes)
 {
   if (retained.getFqn().isChildOf(rootFqn))
   {
    integrateRetainedNode(target, retained);
   }
 }
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

private Node getInternalNode(Node parentNode, Fqn internalFqn)
{
 Fqn parentFqn = parentNode.getFqn();
 Object name = internalFqn.get(parentFqn.size());
 prepareContextOptions();
 Node result = parentNode.getChild(name);
 if (result != null && internalFqn.size() < result.getFqn().size())
 {
   // need to recursively walk down the tree
   result = getInternalNode(result, internalFqn);
 }
 return result;
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

private Node getInternalNode(Node parent, Fqn internalFqn)
{
 Object name = internalFqn.get(parent.getFqn().size());
 cache.getInvocationContext().getOptionOverrides().setSkipCacheStatusCheck(true);
 Node result = parent.getChild(name);
 if (result != null && internalFqn.size() < result.getFqn().size())
 {
   // need to recursively walk down the tree
   result = getInternalNode(result, internalFqn);
 }
 return result;
}

代码示例来源:origin: org.mobicents.core/mobicents-core-jar

String profileName = profileNode.getFqn()
    .toString().substring(
        (profileManager.getRootFqn() + "/profile:"

代码示例来源:origin: org.mobicents.core/mobicents-core-jar

Node profileNode = (Node) it.next();
String profileName = profileNode
    .getFqn()
    .toString()
    .substring(("/" + key + "/").length());

代码示例来源:origin: org.jboss.cache/jbosscache-core

private void migrateDefunctData(NodeSPI backupRoot, Address dataOwner)
{
 Fqn defunctBackupRootFqn = getDefunctBackupRootFqn(dataOwner);
 if (log.isDebugEnabled()) log.debug("Migrating defunct data.  Backup root is " + backupRoot + ". New backup root is " + defunctBackupRootFqn);
 if (trace) log.trace("Children of backup root are " + backupRoot.getChildren());
 String ownerName = buddyFqnTransformer.getGroupNameFromAddress(dataOwner);
 
 Set<DefunctDataHistory> newHistorySet = new ConcurrentHashSet<DefunctDataHistory>();
 Set<DefunctDataHistory> historySet = defunctDataHistory.putIfAbsent(ownerName, newHistorySet);
 if (historySet == null)
 {
   historySet = newHistorySet;
 }
 
 DefunctDataHistory history = new DefunctDataHistory(dataOwner, (Integer) defunctBackupRootFqn.getLastElement(), System.currentTimeMillis());
 historySet.add(history);
 
 for (Object child : backupRoot.getChildren())
 {
   Fqn childFqn = ((Node) child).getFqn();
   cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
   cache.move(childFqn, defunctBackupRootFqn);
 }
 
 history.recordDataMoved();
 cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(true);
 backupRoot.getParentDirect().removeChild(backupRoot.getFqn().getLastElement());
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

private void integrateRetainedNode(NodeSPI ancestor, Node descendant)
 Fqn descFqn = descendant.getFqn();
 Fqn ancFqn = ancestor.getFqn();
 Object name = descFqn.get(ancFqn.size());

代码示例来源:origin: org.jboss.cache/jbosscache-core

rpcManager.fetchPartialState(members, subtreeRoot.getFqn());
 cache.getInvocationContext().getOptionOverrides().setCacheModeLocal(false);
rpcManager.fetchPartialState(sources, fqn, subtreeRoot.getFqn());

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-jboss5-ha-server-cache

public Map<String, String> getSipSessionKeys() {
  Map<String, String> result = new HashMap<String, String>();
  Fqn<String> sipappFqn = getSipappFqn();
  Node<Object, Object> bbRoot = jBossCacheService.getCache().getRoot()
      .getChild(jBossCacheService.BUDDY_BACKUP_FQN);
  if (bbRoot != null) {
    Set<Node<Object, Object>> owners = bbRoot.getChildren();
    if (owners != null) {
      for (Node<Object, Object> owner : owners) {
        @SuppressWarnings("unchecked")
        Node sipRoot = owner.getChild(sipappFqn);
        if (sipRoot != null) {
          @SuppressWarnings("unchecked")
          Set<String> ids = sipRoot.getChildrenNames();
          storeSipSessionOwners(ids, (String) owner.getFqn()
              .getLastElement(), result);
        }
      }
    }
  }
  storeSipSessionOwners(jBossCacheService.getChildrenNames(sipappFqn), null,
      result);
  return result;
}

代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-jboss5-ha-server-cache

public Map<String, String> getSipApplicationSessionKeys() {
  Map<String, String> result = new HashMap<String, String>();
  Fqn<String> sipappFqn = getSipappFqn();
  Node<Object, Object> bbRoot = jBossCacheService.getCache().getRoot()
      .getChild(jBossCacheService.BUDDY_BACKUP_FQN);
  if (bbRoot != null) {
    Set<Node<Object, Object>> owners = bbRoot.getChildren();
    if (owners != null) {
      for (Node<Object, Object> owner : owners) {
        @SuppressWarnings("unchecked")
        Node sipRoot = owner.getChild(sipappFqn);
        if (sipRoot != null) {
          @SuppressWarnings("unchecked")
          Set<String> ids = sipRoot.getChildrenNames();
          storeSipApplicationSessionOwners(ids, (String) owner.getFqn()
              .getLastElement(), result);
        }
      }
    }
  }
  storeSipApplicationSessionOwners(jBossCacheService.getChildrenNames(sipappFqn), null,
      result);
  return result;
}

代码示例来源:origin: org.jboss.cache/jbosscache-core

if (trace) log.trace("Found node " + actualNode.getFqn() + " but it is not valid. Returning 'no data found'", e);
return GravitateResult.noDataFound();

相关文章