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

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

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

Node.getKeys介绍

[英]Returns a Set containing the data in this Node.
[中]返回包含此节点中数据的集合。

代码示例

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

  1. @Override
  2. public Set<K> keySet()
  3. {
  4. return node.getKeys();
  5. }

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

  1. @Override
  2. public boolean containsKey(Object key)
  3. {
  4. return node.getKeys().contains(key);
  5. }

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

  1. @Override
  2. public boolean contains(Object key)
  3. {
  4. return node.getKeys().contains(key);
  5. }

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

  1. @Override
  2. public Iterator<K> iterator()
  3. {
  4. final Iterator i = node.getKeys().iterator();
  5. return new Iterator<K>()
  6. {
  7. K key;
  8. boolean next = false;
  9. public boolean hasNext()
  10. {
  11. return i.hasNext();
  12. }
  13. @SuppressWarnings("unchecked")
  14. public K next()
  15. {
  16. key = (K) i.next();
  17. next = true;
  18. return key;
  19. }
  20. @SuppressWarnings("unchecked")
  21. public void remove()
  22. {
  23. if (!next)
  24. throw new IllegalStateException();
  25. node.remove(key);
  26. }
  27. };
  28. }

代码示例来源:origin: Verigreen/verigreen

  1. private void populateValues(Node<String, Object> cache, ArrayList<V> list) {
  2. Set<Node<String, Object>> children = cache.getChildren();
  3. for (Node<String, Object> node : children) {
  4. Iterator<String> iterator = node.getKeys().iterator();
  5. if (iterator.hasNext()) {
  6. String key = iterator.next();
  7. V value = RuntimeUtils.<V> cast(node.get(key));
  8. list.add(getClonedValue(value));
  9. }
  10. }
  11. }

代码示例来源:origin: org.jasig.cas/cas-server-integration-jboss

  1. @Override
  2. public Collection<Ticket> getTickets() {
  3. try {
  4. final Node<String, Ticket> node = this.cache.getNode(FQN_TICKET);
  5. if (node == null) {
  6. return Collections.emptyList();
  7. }
  8. final Set<String> keys = node.getKeys();
  9. final List<Ticket> list = new ArrayList<>();
  10. for (final String key : keys) {
  11. /** Returns null if the node contains no mapping for this key. **/
  12. final Ticket ticket = node.get(key);
  13. if (ticket != null) {
  14. list.add(node.get(key));
  15. }
  16. }
  17. return list;
  18. } catch (final CacheException e) {
  19. return Collections.emptyList();
  20. }
  21. }

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

  1. public Set<String> getSipApplicationSessionAttributeKeys(
  2. String sipApplicationSessionKey) {
  3. Set keys = null;
  4. Fqn<String> fqn = delegate.getSipApplicationSessionFqn(combinedPath_,
  5. sipApplicationSessionKey);
  6. try {
  7. Node<Object, Object> node = getCache().getRoot().getChild(Fqn.fromString(fqn.toString() + "/" + AbstractJBossCacheService.ATTRIBUTE_KEY));
  8. if (node != null) {
  9. keys = node.getKeys();
  10. keys.removeAll(INTERNAL_KEYS);
  11. }
  12. } catch (CacheException e) {
  13. log_.error(
  14. "getAttributeKeys(): Exception getting keys for session "
  15. + sipApplicationSessionKey, e);
  16. }
  17. return keys;
  18. }

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

  1. public Set<String> getSipSessionAttributeKeys(
  2. String sipApplicationSessionKey,
  3. String sipSessionKey) {
  4. Set keys = null;
  5. Fqn<String> fqn = delegate.getSipSessionFqn(combinedPath_,
  6. sipApplicationSessionKey, sipSessionKey);
  7. try {
  8. Node<Object, Object> node = getCache().getRoot().getChild(Fqn.fromString(fqn.toString() + "/" + AbstractJBossCacheService.ATTRIBUTE_KEY));
  9. if (node != null) {
  10. keys = node.getKeys();
  11. keys.removeAll(INTERNAL_KEYS);
  12. }
  13. } catch (CacheException e) {
  14. log_.error(
  15. "getAttributeKeys(): Exception getting keys for session "
  16. + sipSessionKey, e);
  17. }
  18. return keys;
  19. }

相关文章