本文整理了Java中net.spy.memcached.MemcachedClient.prepend()
方法的一些代码示例,展示了MemcachedClient.prepend()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MemcachedClient.prepend()
方法的具体详情如下:
包路径:net.spy.memcached.MemcachedClient
类名称:MemcachedClient
方法名:prepend
[英]Prepend to an existing value in the cache.
Note that the return will be false any time a mutation has not occurred.
[中]前置到缓存中的现有值。
请注意,只要没有发生突变,返回值就会为假。
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
/**
* Prepend to an existing value in the cache.
*
* @param cas cas identifier (ignored in the ascii protocol)
* @param key the key to whose value will be prepended
* @param val the value to append
* @return a future indicating success
* @throws IllegalStateException in the rare circumstance where queue
* is too full to accept any more requests
*/
public Future<Boolean> prepend(long cas, String key, Object val) {
return prepend(cas, key, val, transcoder);
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
/**
* Prepend to an existing value in the cache.
*
* <p>Note that the return will be false any time a mutation has not
* occurred.</p>
*
* @param cas cas identifier (ignored in the ascii protocol)
* @param key the key to whose value will be prepended
* @param val the value to append
* @return a future indicating success
* @throws IllegalStateException in the rare circumstance where queue
* is too full to accept any more requests
*/
public Future<Boolean> prepend(long cas, String key, Object val) {
return prepend(cas, key, val, transcoder);
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
/**
* Prepend to an existing value in the cache.
*
* <p>
* Note that the return will be false any time a mutation has not occurred.
* </p>
*
* @param key the key to whose value will be prepended
* @param val the value to append
* @return a future indicating success
* @throws IllegalStateException in the rare circumstance where queue is too
* full to accept any more requests
*/
@Override
public OperationFuture<Boolean> prepend(String key, Object val) {
return prepend(0, key, val, transcoder);
}
代码示例来源:origin: net.spy/spymemcached
/**
* Prepend to an existing value in the cache.
*
* <p>
* Note that the return will be false any time a mutation has not occurred.
* </p>
*
* @param key the key to whose value will be prepended
* @param val the value to append
* @return a future indicating success
* @throws IllegalStateException in the rare circumstance where queue is too
* full to accept any more requests
*/
@Override
public OperationFuture<Boolean> prepend(String key, Object val) {
return prepend(0, key, val, transcoder);
}
代码示例来源:origin: naver/arcus-java-client
/**
* Prepend to an existing value in the cache.
*
* <p>Note that the return will be false any time a mutation has not
* occurred.</p>
*
* @param cas cas identifier (ignored in the ascii protocol)
* @param key the key to whose value will be prepended
* @param val the value to append
* @return a future indicating success
* @throws IllegalStateException in the rare circumstance where queue
* is too full to accept any more requests
*/
public Future<Boolean> prepend(long cas, String key, Object val) {
return prepend(cas, key, val, transcoder);
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
/**
* Prepend to an existing value in the cache.
*
* <p>
* Note that the return will be false any time a mutation has not occurred.
* </p>
*
* @param cas cas identifier (ignored in the ascii protocol)
* @param key the key to whose value will be prepended
* @param val the value to append
* @return a future indicating success
* @throws IllegalStateException in the rare circumstance where queue is too
* full to accept any more requests
*/
public OperationFuture<Boolean> prepend(long cas, String key, Object val) {
return prepend(cas, key, val, transcoder);
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
/**
* Prepend to an existing value in the cache.
*
* If 0 is passed in as the CAS identifier, it will override the value
* on the server without performing the CAS check.
*
* <p>
* Note that the return will be false any time a mutation has not occurred.
* </p>
*
* @param cas cas identifier (ignored in the ascii protocol)
* @param key the key to whose value will be prepended
* @param val the value to append
* @return a future indicating success
* @throws IllegalStateException in the rare circumstance where queue is too
* full to accept any more requests
*/
@Override
public OperationFuture<Boolean> prepend(long cas, String key, Object val) {
return prepend(cas, key, val, transcoder);
}
代码示例来源:origin: net.spy/spymemcached
/**
* Prepend to an existing value in the cache.
*
* If 0 is passed in as the CAS identifier, it will override the value
* on the server without performing the CAS check.
*
* <p>
* Note that the return will be false any time a mutation has not occurred.
* </p>
*
* @param cas cas identifier (ignored in the ascii protocol)
* @param key the key to whose value will be prepended
* @param val the value to append
* @return a future indicating success
* @throws IllegalStateException in the rare circumstance where queue is too
* full to accept any more requests
*/
@Override
public OperationFuture<Boolean> prepend(long cas, String key, Object val) {
return prepend(cas, key, val, transcoder);
}
代码示例来源:origin: io.snappydata/gemfire-junit
public void testPrepend() throws Exception {
MemcachedClient client = bootstrapClient();
Future<Boolean> b = client.prepend(0, "key", "prepended");
assertTrue(b.get());
assertEquals("prependedmyStringValue", client.get("key"));
b = client.prepend(0, "prependkey", "val");
assertFalse(b.get());
assertNull(client.get("prependkey"));
}
代码示例来源:origin: ECNU-1X/DataX-Masking
break;
case prepend:
future = client.prepend(0L, key, value);
break;
default:
内容来源于网络,如有侵权,请联系作者删除!