本文整理了Java中org.jboss.cache.Node.get()
方法的一些代码示例,展示了Node.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.get()
方法的具体详情如下:
包路径:org.jboss.cache.Node
类名称:Node
方法名:get
[英]Returns the value to which this node maps the specified key. Returns null
if the node contains no mapping for this key.
[中]返回此节点将指定键映射到的值。如果节点不包含此键的映射,则返回null
。
代码示例来源:origin: org.jboss.cache/jbosscache-core
@Override
@SuppressWarnings("unchecked")
public V get(Object key)
{
return node.get((K) key);
}
代码示例来源: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: Verigreen/verigreen
private void populateValues(Node<String, Object> cache, ArrayList<V> list) {
Set<Node<String, Object>> children = cache.getChildren();
for (Node<String, Object> node : children) {
Iterator<String> iterator = node.getKeys().iterator();
if (iterator.hasNext()) {
String key = iterator.next();
V value = RuntimeUtils.<V> cast(node.get(key));
list.add(getClonedValue(value));
}
}
}
代码示例来源:origin: org.jasig.cas/cas-server-integration-jboss
@Override
public Collection<Ticket> getTickets() {
try {
final Node<String, Ticket> node = this.cache.getNode(FQN_TICKET);
if (node == null) {
return Collections.emptyList();
}
final Set<String> keys = node.getKeys();
final List<Ticket> list = new ArrayList<>();
for (final String key : keys) {
/** Returns null if the node contains no mapping for this key. **/
final Ticket ticket = node.get(key);
if (ticket != null) {
list.add(node.get(key));
}
}
return list;
} catch (final CacheException e) {
return Collections.emptyList();
}
}
代码示例来源: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.jboss.seam/jboss-seam
@Override
public Object get(String region, String key) {
try {
Node node = cache.get(getFqn(region));
if (node != null) {
return node.get(key);
} else {
return null;
}
} catch (CacheException e) {
throw new IllegalStateException(String.format("Cache throw exception when trying to get %s from region %s.", key, region), 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.jboss.seam/jboss-seam
@Override
public Object get(String region, String key)
{
try
{
Node node = cache.get(getFqn(region));
if (node != null)
{
return node.get(key);
}
else
{
return null;
}
}
catch (CacheException e)
{
throw new IllegalStateException(String.format("Cache throw exception when trying to get %s from region %s.", key, region), 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());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!