• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java BasicCacheContainer类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.infinispan.commons.api.BasicCacheContainer的典型用法代码示例。如果您正苦于以下问题:Java BasicCacheContainer类的具体用法?Java BasicCacheContainer怎么用?Java BasicCacheContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

BasicCacheContainer类属于org.infinispan.commons.api包,在下文中一共展示了BasicCacheContainer类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: isEmbedded

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
public static boolean isEmbedded(BasicCacheContainer container) {
    try {
        return container instanceof EmbeddedCacheManager;
    } catch (Throwable e) {
        return false;
    }
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:8,
代码来源:InfinispanUtil.java

示例2: isRemote

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
public static boolean isRemote(BasicCacheContainer container) {
    try {
        return container instanceof RemoteCacheManager;
    } catch (Throwable e) {
        return false;
    }
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:8,
代码来源:InfinispanUtil.java

示例3: tearDown

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
@Override
public void tearDown() throws Exception {
    super.tearDown();

    // Has to be done later, maybe CamelTestSupport should
    for (BasicCacheContainer container: clusteredCacheContainers) {
        container.stop();
    }
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:10,
代码来源:InfinispanClusterTestSupport.java

示例4: asRemote

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static RemoteCacheManager asRemote(BasicCacheContainer container) {
    return RemoteCacheManager.class.cast(container);
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:5,
代码来源:InfinispanUtil.java

示例5: getCache

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
public static BasicCache<Object, Object> getCache(BasicCacheContainer cacheContainer, String cacheName) {
    return ObjectHelper.isEmpty(cacheName) ? cacheContainer.getCache() : cacheContainer.getCache(cacheName);
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:4,
代码来源:InfinispanUtil.java

示例6: InfinispanIdempotentRepository

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
public InfinispanIdempotentRepository(BasicCacheContainer cacheContainer, String cacheName) {
    this.cacheContainer = cacheContainer;
    this.cacheName = cacheName;
    this.isManagedCacheContainer = false;
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:6,
代码来源:InfinispanIdempotentRepository.java

示例7: infinispanIdempotentRepository

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
public static InfinispanIdempotentRepository infinispanIdempotentRepository(
        BasicCacheContainer cacheContainer, String processorName) {
    return new InfinispanIdempotentRepository(cacheContainer, processorName);
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:5,
代码来源:InfinispanIdempotentRepository.java

示例8: getCacheContainer

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
/**
 * Specifies the cache Container to connect
 */
public BasicCacheContainer getCacheContainer() {
    return cacheContainer;
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:7,
代码来源:InfinispanConfiguration.java

示例9: setCacheContainer

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
public void setCacheContainer(BasicCacheContainer cacheContainer) {
    this.cacheContainer = cacheContainer;
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:4,
代码来源:InfinispanConfiguration.java

示例10: getCacheContainer

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
public BasicCacheContainer getCacheContainer() {
    return cacheContainer;
}
 

开发者ID:HydAu,
项目名称:Camel,
代码行数:4,
代码来源:InfinispanManager.java

示例11: registerSchema

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
public static void registerSchema(BasicCacheContainer container, Schema schema) {
   container.getCache(AVRO_METADATA_CACHE_NAME).put(schema.getFullName(), schema);
}
 

开发者ID:leads-project,
项目名称:infinispan-avro,
代码行数:4,
代码来源:Support.java

示例12: buildServer

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
private static HotRodServer buildServer(int port) {
    HotRodServer hotRodServer = new HotRodServer() {
        @Override
        public ConfigurationBuilder createTopologyCacheConfig(long distSyncTimeout) {
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
            }

            ConfigurationBuilder c = super.createTopologyCacheConfig(distSyncTimeout);
            c.transaction().syncCommitPhase(false).syncRollbackPhase(false);
            return c;
        }
    };

    HotRodServerConfiguration hotrodConfig = new HotRodServerConfigurationBuilder()
            .host("127.0.0.1")
            .port(port)
            .proxyHost("127.0.0.1")
            .proxyPort(port)
            .topologyStateTransfer(false)
            .defaultCacheName(BasicCacheContainer.DEFAULT_CACHE_NAME)
            .recvBufSize(4096)
            .sendBufSize(4096)
                    //.idleTimeout(0)
            .workerThreads(2)
            .build(true);


    GlobalConfiguration globalConfiguration = new GlobalConfigurationBuilder()
            .classLoader(InfinispanEmbeddedCacheManager.class.getClassLoader())
            .globalJmxStatistics()
            .jmxDomain("org.apache.marmotta.kiwi")
            .allowDuplicateDomains(true)
            .build();

    Configuration defaultConfiguration = new ConfigurationBuilder()
            .clustering()
            .cacheMode(CacheMode.LOCAL)
            .sync()
            .dataContainer()
            .keyEquivalence(ByteArrayEquivalence.INSTANCE)
            .valueEquivalence(ByteArrayEquivalence.INSTANCE)
            .build();

    EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfiguration, defaultConfiguration, true);
    cacheManager.defineConfiguration(CacheManager.NODE_CACHE, defaultConfiguration);
    cacheManager.defineConfiguration(CacheManager.TRIPLE_CACHE, defaultConfiguration);
    cacheManager.defineConfiguration(CacheManager.URI_CACHE, defaultConfiguration);
    cacheManager.defineConfiguration(CacheManager.BNODE_CACHE, defaultConfiguration);
    cacheManager.defineConfiguration(CacheManager.LITERAL_CACHE, defaultConfiguration);
    cacheManager.defineConfiguration(CacheManager.NS_PREFIX_CACHE, defaultConfiguration);
    cacheManager.defineConfiguration(CacheManager.NS_URI_CACHE, defaultConfiguration);
    cacheManager.defineConfiguration(CacheManager.REGISTRY_CACHE, defaultConfiguration);
    cacheManager.getCache(CacheManager.NODE_CACHE, true);
    cacheManager.getCache(CacheManager.TRIPLE_CACHE, true);
    cacheManager.getCache(CacheManager.URI_CACHE, true);
    cacheManager.getCache(CacheManager.BNODE_CACHE, true);
    cacheManager.getCache(CacheManager.LITERAL_CACHE, true);
    cacheManager.getCache(CacheManager.NS_PREFIX_CACHE, true);
    cacheManager.getCache(CacheManager.NS_URI_CACHE, true);
    cacheManager.getCache(CacheManager.REGISTRY_CACHE, true);

    hotRodServer.start(hotrodConfig, cacheManager);

    return hotRodServer;
}
 

开发者ID:apache,
项目名称:marmotta,
代码行数:68,
代码来源:HotRodServerRule.java

示例13: getVendorInstance

点赞 2

import org.infinispan.commons.api.BasicCacheContainer; //导入依赖的package包/类
@Override
public BasicCacheContainer getVendorInstance() {
    return cacheContainer;
}
 

开发者ID:hazelcast,
项目名称:hazelcast-simulator,
代码行数:5,
代码来源:InfinispanDriver.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)