net.sf.ehcache.Ehcache.getSearchAttributes()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(244)

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

Ehcache.getSearchAttributes介绍

暂无

代码示例

代码示例来源:origin: net.sf.ehcache/ehcache

  1. @Override
  2. public Set<Attribute> getSearchAttributes() throws CacheException {
  3. return underlyingCache.getSearchAttributes();
  4. }

代码示例来源:origin: net.sf.ehcache/ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Set<Attribute> getSearchAttributes() throws CacheException {
  5. Thread t = Thread.currentThread();
  6. ClassLoader prev = t.getContextClassLoader();
  7. t.setContextClassLoader(this.classLoader);
  8. try {
  9. return this.cache.getSearchAttributes();
  10. } finally {
  11. t.setContextClassLoader(prev);
  12. }
  13. }

代码示例来源:origin: net.sf.ehcache/ehcache

  1. private Collection<Attribute> getAttributesImpliedByStar(Ehcache cache) {
  2. return isIncludedTargetStar() ? cache.getSearchAttributes() : Collections.<Attribute>emptySet();
  3. }

代码示例来源:origin: net.sf.ehcache/ehcache

  1. @Override
  2. public Map<String, String> getSearchAttributes() {
  3. Map<String, String> result = new HashMap<String, String>();
  4. if (cache != null && cache.getCacheConfiguration().getSearchable() != null) {
  5. Map<String, Attribute> attrMap = new HashMap<String, Attribute>();
  6. for (Attribute attr : cache.getSearchAttributes()) {
  7. attrMap.put(attr.getAttributeName(), attr);
  8. }
  9. for (SearchAttribute sa : cache.getCacheConfiguration().getSearchAttributes().values()) {
  10. String saName = sa.getName();
  11. String typeName = sa.getTypeName();
  12. if (attrMap.containsKey(saName) && typeName != null) {
  13. result.put(saName, typeName);
  14. }
  15. }
  16. }
  17. return result;
  18. }

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

  1. @Override
  2. public Set<Attribute> getSearchAttributes() throws CacheException {
  3. return underlyingCache.getSearchAttributes();
  4. }

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

  1. @Override
  2. public Set<Attribute> getSearchAttributes() throws CacheException {
  3. return underlyingCache.getSearchAttributes();
  4. }

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Set<Attribute> getSearchAttributes() throws CacheException {
  5. Thread t = Thread.currentThread();
  6. ClassLoader prev = t.getContextClassLoader();
  7. t.setContextClassLoader(this.classLoader);
  8. try {
  9. return this.cache.getSearchAttributes();
  10. } finally {
  11. t.setContextClassLoader(prev);
  12. }
  13. }

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Set<Attribute> getSearchAttributes() throws CacheException {
  5. Thread t = Thread.currentThread();
  6. ClassLoader prev = t.getContextClassLoader();
  7. t.setContextClassLoader(this.classLoader);
  8. try {
  9. return this.cache.getSearchAttributes();
  10. } finally {
  11. t.setContextClassLoader(prev);
  12. }
  13. }

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

  1. private Collection<Attribute> getAttributesImpliedByStar(Ehcache cache) {
  2. return isIncludedTargetStar() ? cache.getSearchAttributes() : Collections.<Attribute>emptySet();
  3. }

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

  1. @Override
  2. public Map<String, String> getSearchAttributes() {
  3. Map<String, String> result = new HashMap<String, String>();
  4. if (cache != null && cache.getCacheConfiguration().getSearchable() != null) {
  5. Map<String, Attribute> attrMap = new HashMap<String, Attribute>();
  6. for (Attribute attr : cache.getSearchAttributes()) {
  7. attrMap.put(attr.getAttributeName(), attr);
  8. }
  9. for (SearchAttribute sa : cache.getCacheConfiguration().getSearchAttributes().values()) {
  10. String saName = sa.getName();
  11. String typeName = sa.getTypeName();
  12. if (attrMap.containsKey(saName) && typeName != null) {
  13. result.put(saName, typeName);
  14. }
  15. }
  16. }
  17. return result;
  18. }

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

  1. @Override
  2. public Map<String, String> getSearchAttributes() {
  3. Map<String, String> result = new HashMap<String, String>();
  4. if (cache != null && cache.getCacheConfiguration().getSearchable() != null) {
  5. Map<String, Attribute> attrMap = new HashMap<String, Attribute>();
  6. for (Attribute attr : cache.getSearchAttributes()) {
  7. attrMap.put(attr.getAttributeName(), attr);
  8. }
  9. for (SearchAttribute sa : cache.getCacheConfiguration().getSearchAttributes().values()) {
  10. String saName = sa.getName();
  11. String typeName = sa.getTypeName();
  12. if (attrMap.containsKey(saName) && typeName != null) {
  13. result.put(saName, typeName);
  14. }
  15. }
  16. }
  17. return result;
  18. }

相关文章

Ehcache类方法