当前位置: 首页>>代码示例>>Java>>正文


Java RemoteCache.get方法代码示例

本文整理汇总了Java中org.infinispan.client.hotrod.RemoteCache.get方法的典型用法代码示例。如果您正苦于以下问题:Java RemoteCache.get方法的具体用法?Java RemoteCache.get怎么用?Java RemoteCache.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.infinispan.client.hotrod.RemoteCache的用法示例。


在下文中一共展示了RemoteCache.get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupMetadataCache

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
private boolean setupMetadataCache() throws IOException {
    log.log(Level.INFO, "setupMetadataCache");

    try {
        final RemoteCache<String, String> metadataCache = cacheManagerForIndexableCaches.getCache(ProtobufMetadataManagerConstants.PROTOBUF_METADATA_CACHE_NAME);
        metadataCache.put(RULE_PROTOBUF_DEFINITION_RESOURCE, readResource(RULE_PROTOBUF_DEFINITION_RESOURCE));
        metadataCache.put(CUSTOM_LIST_PROTOBUF_DEFINITION_RESOURCE, readResource(CUSTOM_LIST_PROTOBUF_DEFINITION_RESOURCE));
        final String errors = metadataCache.get(ProtobufMetadataManagerConstants.ERRORS_KEY_SUFFIX);
        if (errors != null) {
            log.log(Level.SEVERE, "Protobuffer files, either Rule or CustomLists contained errors:\n" + errors);
            return false;
        }
    } catch (TransportException ex) {
        return false;
    }
    return true;
}
 
开发者ID:whalebone,项目名称:sinkit-core,代码行数:18,代码来源:MyCacheManagerProvider.java

示例2: test

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
public void test() {

        RemoteCacheManager cacheManager = new RemoteCacheManager("192.168.0.58:11322;192.168.0.58:11422", true);
        RemoteCache<Object, Object> cache = cacheManager.getCache("KHAN_SESSION");

        Set<Object> keySet = cache.keySet();

        Iterator<Object> i = keySet.iterator();
        System.out.println("============= KHAN_SESSION");
        while (i.hasNext()) {
            Object key = i.next();
            System.out.println("> key=" + key);
            Object value = cache.get(key);
            System.out.println("> value=" + value);
            System.out.println("");
        }
        System.out.println("=============");
    }
 
开发者ID:opennaru-dev,项目名称:khan-session,代码行数:19,代码来源:RemoteCaches.java

示例3: test2

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
public void test2() {
    RemoteCacheManager cacheManager = new RemoteCacheManager("192.168.0.58:11322;192.168.0.58:11422", true);
    RemoteCache<Object, Object> cache = cacheManager.getCache("KHAN_SESSION_LOGIN");

    Set<Object> keySet = cache.keySet();

    Iterator<Object> i = keySet.iterator();
    System.out.println("============= KHAN_SESSION_LOGIN");
    while (i.hasNext()) {
        Object key = i.next();
        System.out.println("> key=" + key);
        Object value = cache.get(key);
        System.out.println("> value=" + value);
        System.out.println("");
    }
    System.out.println("=============");
}
 
开发者ID:opennaru-dev,项目名称:khan-session,代码行数:18,代码来源:RemoteCaches.java

示例4: testRemoteCache

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
public void testRemoteCache() {
    RemoteCacheManager cacheManager = new RemoteCacheManager("192.168.0.58:11422;192.168.0.58:11322", true);
    RemoteCache<Object, Object> cache = cacheManager.getCache("KHAN_SESSION_REMOTE");

    Set<Object> keySet = cache.keySet();

    Iterator<Object> i = keySet.iterator();
    System.out.println("============= KHAN_SESSION_REMOTE");
    while (i.hasNext()) {
        Object key = i.next();
        System.out.println("> key=" + key);
        Object value = cache.get(key);
        System.out.println("> value=" + value);
        System.out.println("");
    }
    System.out.println("=============");
}
 
开发者ID:opennaru-dev,项目名称:khan-session,代码行数:18,代码来源:RemoteCaches.java

示例5: testRemoteLoginCache

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
public void testRemoteLoginCache() {
    RemoteCacheManager cacheManager = new RemoteCacheManager("192.168.0.58:11422;192.168.0.58:11322", true);
    RemoteCache<Object, Object> cache = cacheManager.getCache("KHAN_SESSION_LOGIN_REMOTE");

    Set<Object> keySet = cache.keySet();

    Iterator<Object> i = keySet.iterator();
    System.out.println("============= KHAN_SESSION_LOGIN_REMOTE");
    while (i.hasNext()) {
        Object key = i.next();
        System.out.println("> key=" + key);
        Object value = cache.get(key);
        System.out.println("> value=" + value);
        System.out.println("");
    }
    System.out.println("=============");
}
 
开发者ID:opennaru-dev,项目名称:khan-session,代码行数:18,代码来源:RemoteCaches.java

示例6: startInternal

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
protected void startInternal() throws Exception {
    SerializationContext serializationContext = ProtoStreamMarshaller.getSerializationContext(remoteCacheManager);
    String protoFile = builder.build(serializationContext);

    //initialize server-side serialization context
    RemoteCache<String, String> metadataCache = remoteCacheManager.getCache(ProtobufMetadataManagerConstants.PROTOBUF_METADATA_CACHE_NAME);
    metadataCache.put(fileName, protoFile);

    Object error = metadataCache.get(fileName + ProtobufMetadataManagerConstants.ERRORS_KEY_SUFFIX);
    if (error != null) {
        throw new IllegalStateException("Protobuf metadata failed: " + error);
    }
}
 
开发者ID:snowdrop,项目名称:spring-data-snowdrop,代码行数:14,代码来源:ProtobufInitializer.java

示例7: performKeySearch

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
public static Object performKeySearch(String cacheName, String columnNameInSource, Object value, InfinispanConnection conn) throws TranslatorException {
    @SuppressWarnings("rawtypes")
    
	RemoteCache<?, Object> c = (RemoteCache<?, Object>) conn.getCache(cacheName);
    Object v = c.get(value);
    return v;

}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:9,代码来源:DSLSearch.java

示例8: execute

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
@Override
public void execute(String restOfTheLine) throws Exception {

    if (restOfTheLine == null || restOfTheLine.trim().length() == 0) {

        throw new UserErrorException("key name missing");
    }

    String keyName = restOfTheLine.replaceAll(" .*$", "");

    RemoteCache defaultCache = insureConnected();

    Object o = defaultCache.get(keyName);

    Console.info("" + o);
}
 
开发者ID:NovaOrdis,项目名称:playground,代码行数:17,代码来源:Get.java

示例9: readSLAMessage

import org.infinispan.client.hotrod.RemoteCache; //导入方法依赖的package包/类
public SLAMessage readSLAMessage(String key) {
					
	RemoteCache<String, SLAMessage> cache = remoteCacheManager.getSlaMessageCache();
	
	if ( cache.containsKey(key) ) {
		
		return cache.get(key);
		
	} else {
		
		return null;
		
	}
					
}
 
开发者ID:anurag-saran,项目名称:sla-mgmt-brms,代码行数:16,代码来源:JDGDataService.java


注:本文中的org.infinispan.client.hotrod.RemoteCache.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。