Java Code Examples for net.spy.memcached.MemcachedClient#set()
The following examples show how to use
net.spy.memcached.MemcachedClient#set() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MemCachePeer.java From seldon-server with Apache License 2.0 | 5 votes |
public static void put(String key,Object obj) { MemcachedClient client = getClient(); if (client != null) try { client.set(hashKey(key), 0, obj); } catch (Exception ex) { logger.error("Memcache put exeption ",ex); } }
Example 2
Source File: MemCachePeer.java From seldon-server with Apache License 2.0 | 5 votes |
public static void put(String key,Object obj,int expireSeconds) { MemcachedClient client = getClient(); if (client != null) try { client.set(hashKey(key), expireSeconds, obj); } catch (Exception ex) { logger.error("Memcache put expire exeption ",ex); } }
Example 3
Source File: GemcachedDevelopmentJUnitTest.java From gemfirexd-oss with Apache License 2.0 | 4 votes |
public void testSet() throws Exception { MemcachedClient client = bootstrapClient(); Future<Boolean> f = client.set("key", 10, "myStringValue"); assertTrue(f.get()); }
Example 4
Source File: GemcachedDevelopmentJUnitTest.java From gemfirexd-oss with Apache License 2.0 | 4 votes |
public void testSet() throws Exception { MemcachedClient client = bootstrapClient(); Future<Boolean> f = client.set("key", 10, "myStringValue"); assertTrue(f.get()); }