本文整理了Java中org.jboss.cache.Node.getChild()
方法的一些代码示例,展示了Node.getChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getChild()
方法的具体详情如下:
包路径:org.jboss.cache.Node
类名称:Node
方法名:getChild
暂无
代码示例来源:origin: org.jboss.cache/jbosscache-core
@Override
public boolean containsKey(Object arg0)
{
return node.getChild(arg0) != null;
}
代码示例来源:origin: org.hibernate/hibernate-jbosscache
public static Set getChildrenNames(Cache cache, Fqn fqn) {
Node node = cache.getRoot().getChild(fqn);
return (node != null) ? node.getChildrenNames() : Collections.emptySet();
}
代码示例来源: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.jboss.cache/jbosscache-core
@Override
@SuppressWarnings("unchecked")
public V get(Object arg0)
{
Node child = node.getChild(arg0);
if (child == null)
return null;
return (V) child.get(KEY);
}
代码示例来源: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.hibernate/hibernate-jbosscache2
public static Set getChildrenNames(Cache cache, Fqn fqn) {
Node node = cache.getRoot().getChild(fqn);
return (node != null) ? node.getChildrenNames() : Collections.emptySet();
}
代码示例来源:origin: org.jboss.cache/jbosscache-core
@Override
@SuppressWarnings("unchecked")
public V remove(Object arg0)
{
Node child = node.getChild(arg0);
if (child == null)
return null;
V o = (V) child.remove(KEY);
node.removeChild(arg0);
return o;
}
代码示例来源:origin: org.mobicents.ha.javax.sip/restcomm-jain-sip-jboss5
public SIPDialog getDialog(String dialogId) throws SipCacheException {
try {
Node dialogNode = ((Node) dialogRootNode.getChild(Fqn.fromString(dialogId)));
if(dialogNode != null) {
return (SIPDialog) dialogNode.get(dialogId);
} else {
return null;
}
} catch (CacheException e) {
throw new SipCacheException("A problem occured while retrieving the following dialog " + dialogId + " from JBoss Cache", e);
}
}
代码示例来源:origin: org.mobicents.ha.javax.sip/restcomm-jain-sip-jboss5
public SIPServerTransaction getServerTransaction(String transactionId)
throws SipCacheException {
try {
Node serverTransactionNode = ((Node) serverTxRootNode.getChild(Fqn.fromString(transactionId)));
if(serverTransactionNode != null) {
return (SIPServerTransaction) serverTransactionNode.get(transactionId);
} else {
return null;
}
} catch (CacheException e) {
throw new SipCacheException("A problem occured while retrieving the following server transaction " + transactionId + " from JBoss Cache", e);
}
}
代码示例来源:origin: org.mobicents.ha.javax.sip/restcomm-jain-sip-jboss5
public SIPClientTransaction getClientTransaction(String transactionId)
throws SipCacheException {
try {
Node clientTransactionNode = ((Node) clientTxRootNode.getChild(Fqn
.fromString(transactionId)));
if (clientTransactionNode != null) {
return (SIPClientTransaction) clientTransactionNode
.get(transactionId);
} else {
return null;
}
} catch (CacheException e) {
throw new SipCacheException(
"A problem occured while retrieving the following client transaction "
+ transactionId + " from JBoss Cache", e);
}
}
代码示例来源:origin: org.mobicents.ha.javax.sip/restcomm-jain-sip-jboss5
public void updateDialog(SIPDialog sipDialog) throws SipCacheException {
Node dialogNode = ((Node) dialogRootNode.getChild(Fqn.fromString(sipDialog.getDialogId())));
if(dialogNode != null) {
if(dialogNode != null) {
sipDialog = (SIPDialog) dialogNode.get(sipDialog.getDialogId());
}
}
}
代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-jboss5-ha-server-cache
public Set<String> getSipApplicationSessionAttributeKeys(
String sipApplicationSessionKey) {
Set keys = null;
Fqn<String> fqn = delegate.getSipApplicationSessionFqn(combinedPath_,
sipApplicationSessionKey);
try {
Node<Object, Object> node = getCache().getRoot().getChild(Fqn.fromString(fqn.toString() + "/" + AbstractJBossCacheService.ATTRIBUTE_KEY));
if (node != null) {
keys = node.getKeys();
keys.removeAll(INTERNAL_KEYS);
}
} catch (CacheException e) {
log_.error(
"getAttributeKeys(): Exception getting keys for session "
+ sipApplicationSessionKey, e);
}
return keys;
}
代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-jboss5-ha-server-cache
public Set<String> getSipSessionAttributeKeys(
String sipApplicationSessionKey,
String sipSessionKey) {
Set keys = null;
Fqn<String> fqn = delegate.getSipSessionFqn(combinedPath_,
sipApplicationSessionKey, sipSessionKey);
try {
Node<Object, Object> node = getCache().getRoot().getChild(Fqn.fromString(fqn.toString() + "/" + AbstractJBossCacheService.ATTRIBUTE_KEY));
if (node != null) {
keys = node.getKeys();
keys.removeAll(INTERNAL_KEYS);
}
} catch (CacheException e) {
log_.error(
"getAttributeKeys(): Exception getting keys for session "
+ sipSessionKey, e);
}
return keys;
}
代码示例来源:origin: org.mobicents.ha.javax.sip/restcomm-jain-sip-jboss5
public void start() throws SipCacheException {
try {
cache.start();
} catch (Exception e) {
throw new SipCacheException("Couldn't start JBoss Cache", e);
}
dialogRootNode = cache.getRoot().getChild(SipCache.DIALOG_PARENT_FQN_ELEMENT);
if(dialogRootNode == null) {
dialogRootNode = cache.getRoot().addChild(Fqn.fromElements(SipCache.DIALOG_PARENT_FQN_ELEMENT));
}
if(clusteredSipStack.getReplicationStrategy() == ReplicationStrategy.EarlyDialog) {
serverTxRootNode = cache.getRoot().getChild(SipCache.SERVER_TX_PARENT_FQN_ELEMENT);
if(serverTxRootNode == null) {
serverTxRootNode = cache.getRoot().addChild(Fqn.fromElements(SipCache.SERVER_TX_PARENT_FQN_ELEMENT));
}
}
}
代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-jboss5-ha-server-cache
public Map<String, Object> getSipApplicationSessionAttributes(
String sipApplicationSessionKey) {
if (sipApplicationSessionKey == null) {
@SuppressWarnings("unchecked")
Map<String, Object> empty = Collections.EMPTY_MAP;
return empty;
}
Fqn<String> fqn = delegate.getSipApplicationSessionFqn(combinedPath_,
sipApplicationSessionKey);
Node<Object, Object> node = getCache().getRoot().getChild(Fqn.fromString(fqn.toString() + "/" + AbstractJBossCacheService.ATTRIBUTE_KEY));
Map<Object, Object> rawData = node.getData();
return getSessionAttributes(null, rawData);
}
代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-jboss5-ha-server-cache
public Map<String, Object> getSipSessionAttributes(
String sipApplicationSessionKey,
String sipSessionKey) {
if (sipSessionKey == null) {
@SuppressWarnings("unchecked")
Map<String, Object> empty = Collections.EMPTY_MAP;
return empty;
}
Fqn<String> fqn = delegate.getSipSessionFqn(combinedPath_,
sipApplicationSessionKey, sipSessionKey);
Node<Object, Object> node = getCache().getRoot().getChild(Fqn.fromString(fqn.toString() + "/" + AbstractJBossCacheService.ATTRIBUTE_KEY));
Map<Object, Object> rawData = node.getData();
return getSessionAttributes(null, rawData);
}
代码示例来源: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.hibernate/hibernate-jbosscache2
added = root.getChild(fqn);
代码示例来源:origin: org.hibernate/hibernate-jbosscache
added = root.getChild(fqn);
内容来源于网络,如有侵权,请联系作者删除!