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

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

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

Ehcache.getInternalContext介绍

[英]This should not be used
[中]这不应该被使用

代码示例

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. return underlyingCache.getInternalContext();
  6. }

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

  1. /**
  2. * Creates a new Hibernate pluggable cache by name.
  3. * <p>
  4. * ehcache will look in ehcache.xml to load the configuration for the cache.
  5. * If the cache is not there, it will use the defaultCache settings. It is
  6. * always a good idea to specifically configure each cache.
  7. *
  8. * @param cache The backing ehcache cache.
  9. */
  10. public EhCache(net.sf.ehcache.Ehcache cache) {
  11. this.cache = cache;
  12. Object context = cache.getInternalContext();
  13. if (context instanceof CacheLockProvider) {
  14. lockProvider = (CacheLockProvider) context;
  15. } else {
  16. lockProvider = null;
  17. }
  18. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. return this.cache.getInternalContext();
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

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

  1. /**
  2. * Construct an transactional Hibernate cache region around the given Ehcache instance.
  3. */
  4. EhcacheTransactionalDataRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache cache, Settings settings,
  5. CacheDataDescription metadata, Properties properties) {
  6. super(accessStrategyFactory, cache, properties);
  7. this.settings = settings;
  8. this.metadata = metadata;
  9. Object context = cache.getInternalContext();
  10. if (context instanceof CacheLockProvider) {
  11. this.lockProvider = (CacheLockProvider) context;
  12. } else {
  13. this.lockProvider = new StripedReadWriteLockSync(LOCAL_LOCK_PROVIDER_CONCURRENCY);
  14. }
  15. }

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

  1. private CacheLockProvider createCacheLockProvider() {
  2. Object context = underlyingCache.getInternalContext();
  3. if (underlyingCache.getCacheConfiguration().isTerracottaClustered() && context != null) {
  4. return (CacheLockProvider) context;
  5. } else {
  6. return new StripedReadWriteLockSync(stripes);
  7. }
  8. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. return underlyingCache.getInternalContext();
  6. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. return underlyingCache.getInternalContext();
  6. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. return underlyingCache.getInternalContext();
  6. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. return cache.getInternalContext();
  6. }

代码示例来源:origin: com.madgag/mini-git-server-server

  1. public Object getInternalContext() {
  2. return self.getInternalContext();
  3. }

代码示例来源:origin: rtyley/mini-git-server

  1. public Object getInternalContext() {
  2. return self.getInternalContext();
  3. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. return this.cache.getInternalContext();
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. return this.cache.getInternalContext();
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. public Object getInternalContext() {
  5. // THIS IS GENERATED CODE -- DO NOT HAND MODIFY!
  6. Thread t = Thread.currentThread();
  7. ClassLoader prev = t.getContextClassLoader();
  8. t.setContextClassLoader(this.classLoader);
  9. try {
  10. return this.cache.getInternalContext();
  11. } finally {
  12. t.setContextClassLoader(prev);
  13. }
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. /**
  2. * Construct an transactional Hibernate cache region around the given Ehcache instance.
  3. */
  4. EhcacheTransactionalDataRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache cache, Settings settings,
  5. CacheDataDescription metadata, Properties properties) {
  6. super(accessStrategyFactory, cache, properties);
  7. this.settings = settings;
  8. this.metadata = metadata;
  9. Object context = cache.getInternalContext();
  10. if (context instanceof CacheLockProvider) {
  11. this.lockProvider = (CacheLockProvider) context;
  12. } else {
  13. this.lockProvider = new StripedReadWriteLockSync(LOCAL_LOCK_PROVIDER_CONCURRENCY);
  14. }
  15. }

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

  1. /**
  2. * Construct an transactional Hibernate cache region around the given Ehcache instance.
  3. */
  4. EhcacheTransactionalDataRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache cache, Settings settings,
  5. CacheDataDescription metadata, Properties properties) {
  6. super(accessStrategyFactory, cache, properties);
  7. this.settings = settings;
  8. this.metadata = metadata;
  9. Object context = cache.getInternalContext();
  10. if (context instanceof CacheLockProvider) {
  11. this.lockProvider = (CacheLockProvider) context;
  12. } else {
  13. this.lockProvider = new StripedReadWriteLockSync(LOCAL_LOCK_PROVIDER_CONCURRENCY);
  14. }
  15. }

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

  1. /**
  2. * Construct an transactional Hibernate cache region around the given Ehcache instance.
  3. */
  4. EhcacheTransactionalDataRegion(EhcacheAccessStrategyFactory accessStrategyFactory, Ehcache cache, Settings settings,
  5. CacheDataDescription metadata, Properties properties) {
  6. super(accessStrategyFactory, cache, properties);
  7. this.settings = settings;
  8. this.metadata = metadata;
  9. Object context = cache.getInternalContext();
  10. if (context instanceof CacheLockProvider) {
  11. this.lockProvider = (CacheLockProvider) context;
  12. } else {
  13. this.lockProvider = new StripedReadWriteLockSync(LOCAL_LOCK_PROVIDER_CONCURRENCY);
  14. }
  15. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

  1. private CacheLockProvider createCacheLockProvider() {
  2. Object context = underlyingCache.getInternalContext();
  3. if (underlyingCache.getCacheConfiguration().isTerracottaClustered() && context != null) {
  4. return (CacheLockProvider) context;
  5. } else {
  6. return new StripedReadWriteLockSync(stripes);
  7. }
  8. }

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

  1. private CacheLockProvider createCacheLockProvider() {
  2. Object context = underlyingCache.getInternalContext();
  3. if (underlyingCache.getCacheConfiguration().isTerracottaClustered() && context != null) {
  4. return (CacheLockProvider) context;
  5. } else {
  6. return new StripedReadWriteLockSync(stripes);
  7. }
  8. }

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

  1. private CacheLockProvider createCacheLockProvider() {
  2. Object context = underlyingCache.getInternalContext();
  3. if (underlyingCache.getCacheConfiguration().isTerracottaClustered() && context != null) {
  4. return (CacheLockProvider) context;
  5. } else {
  6. return new StripedReadWriteLockSync(stripes);
  7. }
  8. }

相关文章

Ehcache类方法