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

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

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

MemcachedClient.append介绍

[英]Append 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

/**
 * Append 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 appended
 * @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> append(long cas, String key, Object val) {
  return append(cas, key, val, transcoder);
}

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

/**
 * Append 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 appended
 * @param val the value to append
 * @return a future indicating success, false if there was no change to the
 *         value
 * @throws IllegalStateException in the rare circumstance where queue is too
 *           full to accept any more requests
 */
public OperationFuture<Boolean> append(long cas, String key, Object val) {
 return append(cas, key, val, transcoder);
}

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

/**
 * Append 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 appended
 * @param val the value to append
 * @return a future indicating success, false if there was no change to the
 *         value
 * @throws IllegalStateException in the rare circumstance where queue is too
 *           full to accept any more requests
 */
@Override
public OperationFuture<Boolean> append(String key, Object val) {
 return append(0, key, val, transcoder);
}

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

/**
 * Append 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 appended
 * @param val the value to append
 * @return a future indicating success, false if there was no change to the
 *         value
 * @throws IllegalStateException in the rare circumstance where queue is too
 *           full to accept any more requests
 */
@Override
public OperationFuture<Boolean> append(String key, Object val) {
 return append(0, key, val, transcoder);
}

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

/**
 * Append 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 appended
 * @param val the value to append
 * @return a future indicating success, false if there was no change
 *         to the value
 * @throws IllegalStateException in the rare circumstance where queue
 *         is too full to accept any more requests
 */
public Future<Boolean> append(long cas, String key, Object val) {
  return append(cas, key, val, transcoder);
}

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

/**
 * Append 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 appended
 * @param val the value to append
 * @return a future indicating success, false if there was no change
 * to the value
 * @throws IllegalStateException in the rare circumstance where queue
 *                               is too full to accept any more requests
 */
public Future<Boolean> append(long cas, String key, Object val) {
 return append(cas, key, val, transcoder);
}

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

/**
 * Append 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 appended
 * @param val the value to append
 * @return a future indicating success, false if there was no change to the
 *         value
 * @throws IllegalStateException in the rare circumstance where queue is too
 *           full to accept any more requests
 */
@Override
public OperationFuture<Boolean> append(long cas, String key, Object val) {
 return append(cas, key, val, transcoder);
}

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

/**
 * Append 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 appended
 * @param val the value to append
 * @return a future indicating success, false if there was no change to the
 *         value
 * @throws IllegalStateException in the rare circumstance where queue is too
 *           full to accept any more requests
 */
@Override
public OperationFuture<Boolean> append(long cas, String key, Object val) {
 return append(cas, key, val, transcoder);
}

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

public void testAppend() throws Exception {
 MemcachedClient client = bootstrapClient();
 Future<Boolean> b = client.append(0, "key", "WithAddition");
 assertTrue(b.get());
 assertEquals("myStringValueWithAddition", client.get("key"));
 b = client.append(0, "appendkey", "val");
 assertFalse(b.get());
 assertNull(client.get("appendkey"));
}

代码示例来源:origin: org.opensaml/opensaml-storage-impl

/**
   * Update context key list.
   * 
   * @param suffix the suffix
   * @param namespace the namespace
   * @param key the storage key
   * @return whether the update was a success
   * @throws IOException if an error occurs
   */
  private boolean updateContextKeyList(final String suffix, final String namespace, final String key)
      throws IOException {
    final String listKey = namespace + suffix;
    final String newItem = key + CTX_KEY_LIST_DELIMITER;
    final boolean success = handleAsyncResult(memcacheClient.append(listKey, newItem, stringTranscoder));
    if (!success) {
      // Assume list does not exist and create it
      return handleAsyncResult(memcacheClient.add(listKey, 0, newItem, stringTranscoder));
    }
    return success;
  }
}

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

future = client.append(0L, key, value);
  break;
case prepend:

相关文章