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

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

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

MemcachedClient.asyncMutate介绍

暂无

代码示例

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the incremented value, or -1 if the increment failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. public OperationFuture<Long> asyncIncr(String key, long by) {
  11. return asyncMutate(Mutator.incr, key, by, 0, -1);
  12. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the decremented value, or -1 if the increment failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. public OperationFuture<Long> asyncDecr(String key, long by) {
  11. return asyncMutate(Mutator.decr, key, by, 0, -1);
  12. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the decremented value, or -1 if the increment failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. public OperationFuture<Long> asyncDecr(String key, int by) {
  11. return asyncMutate(Mutator.decr, key, (long)by, 0, -1);
  12. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the incremented value, or -1 if the increment failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. public OperationFuture<Long> asyncIncr(String key, int by) {
  11. return asyncMutate(Mutator.incr, key, (long)by, 0, -1);
  12. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @return a future with the incremented value, or -1 if the
  5. * increment failed.
  6. * @throws IllegalStateException in the rare circumstance where queue
  7. * is too full to accept any more requests
  8. */
  9. public Future<Long> asyncIncr(String key, int by) {
  10. return asyncMutate(Mutator.incr, key, by, 0, -1);
  11. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @return a future with the decremented value, or -1 if the
  5. * increment failed.
  6. * @throws IllegalStateException in the rare circumstance where queue
  7. * is too full to accept any more requests
  8. */
  9. public Future<Long> asyncDecr(String key, int by) {
  10. return asyncMutate(Mutator.decr, key, by, 0, -1);
  11. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @param def the default value (if the counter does not exist)
  7. * @param exp the expiration of this object
  8. * @return a future with the incremented value, or -1 if the
  9. * increment failed.
  10. * @throws IllegalStateException in the rare circumstance where queue
  11. * is too full to accept any more requests
  12. */
  13. public Future<Long> asyncIncr(String key, int by, long def, int exp) {
  14. return asyncMutate(Mutator.incr, key, by, def, exp);
  15. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the incremented value, or -1 if the increment failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. @Override
  11. public OperationFuture<Long> asyncIncr(String key, int by) {
  12. return asyncMutate(Mutator.incr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @param key key to decrement
  5. * @param by the amount to decrement the value by
  6. * @return a future with the decremented value, or -1 if the decrement failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. @Override
  11. public OperationFuture<Long> asyncDecr(String key, long by) {
  12. return asyncMutate(Mutator.decr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the incremented value, or -1 if the increment failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. @Override
  11. public OperationFuture<Long> asyncIncr(String key, long by) {
  12. return asyncMutate(Mutator.incr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the incremented value, or -1 if the increment failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. @Override
  11. public OperationFuture<Long> asyncIncr(String key, long by) {
  12. return asyncMutate(Mutator.incr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the decremented value, or -1 if the
  7. * increment failed.
  8. * @throws IllegalStateException in the rare circumstance where queue
  9. * is too full to accept any more requests
  10. */
  11. public Future<Long> asyncDecr(String key, int by) {
  12. return asyncMutate(Mutator.decr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @param key key to decrement
  5. * @param by the amount to decrement the value by
  6. * @return a future with the decremented value, or -1 if the decrement failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. @Override
  11. public OperationFuture<Long> asyncDecr(String key, int by) {
  12. return asyncMutate(Mutator.decr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the incremented value, or -1 if the increment failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. @Override
  11. public OperationFuture<Long> asyncIncr(String key, int by) {
  12. return asyncMutate(Mutator.incr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the incremented value, or -1 if the
  7. * increment failed.
  8. * @throws IllegalStateException in the rare circumstance where queue
  9. * is too full to accept any more requests
  10. */
  11. public Future<Long> asyncIncr(String key, int by) {
  12. return asyncMutate(Mutator.incr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @param key key to decrement
  5. * @param by the amount to decrement the value by
  6. * @return a future with the decremented value, or -1 if the decrement failed.
  7. * @throws IllegalStateException in the rare circumstance where queue is too
  8. * full to accept any more requests
  9. */
  10. @Override
  11. public OperationFuture<Long> asyncDecr(String key, int by) {
  12. return asyncMutate(Mutator.decr, key, by, 0, -1);
  13. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @return a future with the incremented value, or -1 if the
  7. * increment failed.
  8. * @throws IllegalStateException in the rare circumstance where queue
  9. * is too full to accept any more requests
  10. */
  11. public Future<Long> asyncIncr(String key, int by) {
  12. return asyncMutate(Mutator.incr, key, by, -1, 0);
  13. }

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

  1. /**
  2. * Asychronous increment.
  3. *
  4. * @param key key to increment
  5. * @param by the amount to increment the value by
  6. * @param def the default value (if the counter does not exist)
  7. * @return a future with the incremented value, or -1 if the increment failed.
  8. * @throws IllegalStateException in the rare circumstance where queue is too
  9. * full to accept any more requests
  10. */
  11. @Override
  12. public OperationFuture<Long> asyncIncr(String key, long by, long def) {
  13. return asyncMutate(Mutator.incr, key, by, def, 0);
  14. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @param key key to decrement
  5. * @param by the amount to decrement the value by
  6. * @param def the default value (if the counter does not exist)
  7. * @return a future with the decremented value, or -1 if the decrement failed.
  8. * @throws IllegalStateException in the rare circumstance where queue is too
  9. * full to accept any more requests
  10. */
  11. @Override
  12. public OperationFuture<Long> asyncDecr(String key, long by, long def) {
  13. return asyncMutate(Mutator.decr, key, by, def, 0);
  14. }

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

  1. /**
  2. * Asynchronous decrement.
  3. *
  4. * @param key key to decrement
  5. * @param by the amount to decrement the value by
  6. * @param def the default value (if the counter does not exist)
  7. * @return a future with the decremented value, or -1 if the decrement failed.
  8. * @throws IllegalStateException in the rare circumstance where queue is too
  9. * full to accept any more requests
  10. */
  11. @Override
  12. public OperationFuture<Long> asyncDecr(String key, int by, long def) {
  13. return asyncMutate(Mutator.decr, key, by, def, 0);
  14. }

相关文章