net.spy.memcached.MemcachedClient.prepend()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(131)

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

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

  1. /**
  2. * Prepend to an existing value in the cache.
  3. *
  4. * @param cas cas identifier (ignored in the ascii protocol)
  5. * @param key the key to whose value will be prepended
  6. * @param val the value to append
  7. * @return a future indicating success
  8. * @throws IllegalStateException in the rare circumstance where queue
  9. * is too full to accept any more requests
  10. */
  11. public Future<Boolean> prepend(long cas, String key, Object val) {
  12. return prepend(cas, key, val, transcoder);
  13. }

代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached

  1. /**
  2. * Prepend to an existing value in the cache.
  3. *
  4. * <p>Note that the return will be false any time a mutation has not
  5. * occurred.</p>
  6. *
  7. * @param cas cas identifier (ignored in the ascii protocol)
  8. * @param key the key to whose value will be prepended
  9. * @param val the value to append
  10. * @return a future indicating success
  11. * @throws IllegalStateException in the rare circumstance where queue
  12. * is too full to accept any more requests
  13. */
  14. public Future<Boolean> prepend(long cas, String key, Object val) {
  15. return prepend(cas, key, val, transcoder);
  16. }

代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client

  1. /**
  2. * Prepend to an existing value in the cache.
  3. *
  4. * <p>
  5. * Note that the return will be false any time a mutation has not occurred.
  6. * </p>
  7. *
  8. * @param key the key to whose value will be prepended
  9. * @param val the value to append
  10. * @return a future indicating success
  11. * @throws IllegalStateException in the rare circumstance where queue is too
  12. * full to accept any more requests
  13. */
  14. @Override
  15. public OperationFuture<Boolean> prepend(String key, Object val) {
  16. return prepend(0, key, val, transcoder);
  17. }

代码示例来源:origin: net.spy/spymemcached

  1. /**
  2. * Prepend to an existing value in the cache.
  3. *
  4. * <p>
  5. * Note that the return will be false any time a mutation has not occurred.
  6. * </p>
  7. *
  8. * @param key the key to whose value will be prepended
  9. * @param val the value to append
  10. * @return a future indicating success
  11. * @throws IllegalStateException in the rare circumstance where queue is too
  12. * full to accept any more requests
  13. */
  14. @Override
  15. public OperationFuture<Boolean> prepend(String key, Object val) {
  16. return prepend(0, key, val, transcoder);
  17. }

代码示例来源:origin: naver/arcus-java-client

  1. /**
  2. * Prepend to an existing value in the cache.
  3. *
  4. * <p>Note that the return will be false any time a mutation has not
  5. * occurred.</p>
  6. *
  7. * @param cas cas identifier (ignored in the ascii protocol)
  8. * @param key the key to whose value will be prepended
  9. * @param val the value to append
  10. * @return a future indicating success
  11. * @throws IllegalStateException in the rare circumstance where queue
  12. * is too full to accept any more requests
  13. */
  14. public Future<Boolean> prepend(long cas, String key, Object val) {
  15. return prepend(cas, key, val, transcoder);
  16. }

代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached

  1. /**
  2. * Prepend to an existing value in the cache.
  3. *
  4. * <p>
  5. * Note that the return will be false any time a mutation has not occurred.
  6. * </p>
  7. *
  8. * @param cas cas identifier (ignored in the ascii protocol)
  9. * @param key the key to whose value will be prepended
  10. * @param val the value to append
  11. * @return a future indicating success
  12. * @throws IllegalStateException in the rare circumstance where queue is too
  13. * full to accept any more requests
  14. */
  15. public OperationFuture<Boolean> prepend(long cas, String key, Object val) {
  16. return prepend(cas, key, val, transcoder);
  17. }

代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client

  1. /**
  2. * Prepend to an existing value in the cache.
  3. *
  4. * If 0 is passed in as the CAS identifier, it will override the value
  5. * on the server without performing the CAS check.
  6. *
  7. * <p>
  8. * Note that the return will be false any time a mutation has not occurred.
  9. * </p>
  10. *
  11. * @param cas cas identifier (ignored in the ascii protocol)
  12. * @param key the key to whose value will be prepended
  13. * @param val the value to append
  14. * @return a future indicating success
  15. * @throws IllegalStateException in the rare circumstance where queue is too
  16. * full to accept any more requests
  17. */
  18. @Override
  19. public OperationFuture<Boolean> prepend(long cas, String key, Object val) {
  20. return prepend(cas, key, val, transcoder);
  21. }

代码示例来源:origin: net.spy/spymemcached

  1. /**
  2. * Prepend to an existing value in the cache.
  3. *
  4. * If 0 is passed in as the CAS identifier, it will override the value
  5. * on the server without performing the CAS check.
  6. *
  7. * <p>
  8. * Note that the return will be false any time a mutation has not occurred.
  9. * </p>
  10. *
  11. * @param cas cas identifier (ignored in the ascii protocol)
  12. * @param key the key to whose value will be prepended
  13. * @param val the value to append
  14. * @return a future indicating success
  15. * @throws IllegalStateException in the rare circumstance where queue is too
  16. * full to accept any more requests
  17. */
  18. @Override
  19. public OperationFuture<Boolean> prepend(long cas, String key, Object val) {
  20. return prepend(cas, key, val, transcoder);
  21. }

代码示例来源:origin: io.snappydata/gemfire-junit

  1. public void testPrepend() throws Exception {
  2. MemcachedClient client = bootstrapClient();
  3. Future<Boolean> b = client.prepend(0, "key", "prepended");
  4. assertTrue(b.get());
  5. assertEquals("prependedmyStringValue", client.get("key"));
  6. b = client.prepend(0, "prependkey", "val");
  7. assertFalse(b.get());
  8. assertNull(client.get("prependkey"));
  9. }

代码示例来源:origin: ECNU-1X/DataX-Masking

  1. break;
  2. case prepend:
  3. future = client.prepend(0L, key, value);
  4. break;
  5. default:

相关文章