本文整理了Java中net.spy.memcached.MemcachedClient.asyncStore()
方法的一些代码示例,展示了MemcachedClient.asyncStore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MemcachedClient.asyncStore()
方法的具体详情如下:
包路径:net.spy.memcached.MemcachedClient
类名称:MemcachedClient
方法名:asyncStore
暂无
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
private Future<Boolean> asyncStore(StoreType storeType,
String key, int exp, Object value) {
return asyncStore(storeType, key, exp, value, transcoder);
}
代码示例来源:origin: net.spy/spymemcached
private OperationFuture<Boolean> asyncStore(StoreType storeType, String key,
int exp, Object value) {
return asyncStore(storeType, key, exp, value, transcoder);
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
private OperationFuture<Boolean> asyncStore(StoreType storeType, String key,
int exp, Object value) {
return asyncStore(storeType, key, exp, value, transcoder);
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
private OperationFuture<Boolean> asyncStore(StoreType storeType, String key,
int exp, Object value) {
return asyncStore(storeType, key, exp, value, transcoder);
}
代码示例来源:origin: naver/arcus-java-client
private Future<Boolean> asyncStore(StoreType storeType,
String key, int exp, Object value) {
return asyncStore(storeType, key, exp, value, transcoder);
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
private Future<Boolean> asyncStore(StoreType storeType,
String key, int exp, Object value) {
return asyncStore(storeType, key, exp, value, transcoder);
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
return asyncStore(StoreType.set, key, exp, o, tc);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
return asyncStore(StoreType.add, key, exp, o, transcoder);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
return asyncStore(StoreType.replace, key, exp, o, tc);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
return asyncStore(StoreType.add, key, exp, o, transcoder);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
return asyncStore(StoreType.set, key, exp, o, transcoder);
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
return asyncStore(StoreType.add, key, exp, o, transcoder);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
return asyncStore(StoreType.add, key, exp, o, tc);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
return asyncStore(StoreType.set, key, exp, o, transcoder);
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
return asyncStore(StoreType.set, key, exp, o, tc);
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
private long mutateWithDefault(Mutator t, String key, long by, long def,
int exp) {
long rv = mutate(t, key, by, def, exp);
// The ascii protocol doesn't support defaults, so I added them
// manually here.
if (rv == -1) {
Future<Boolean> f = asyncStore(StoreType.add, key, exp,
String.valueOf(def));
try {
if (f.get(operationTimeout, TimeUnit.MILLISECONDS)) {
rv = def;
} else {
rv = mutate(t, key, by, 0, exp);
assert rv != -1 : "Failed to mutate or init value";
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted waiting for store", e);
} catch (ExecutionException e) {
throw new RuntimeException("Failed waiting for store", e);
} catch (TimeoutException e) {
throw new OperationTimeoutException("Timeout waiting to mutate or init"
+ " value", e);
}
}
return rv;
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
private long mutateWithDefault(Mutator t, String key,
int by, long def, int exp) {
long rv=mutate(t, key, by, def, exp);
// The ascii protocol doesn't support defaults, so I added them
// manually here.
if(rv == -1) {
Future<Boolean> f=asyncStore(StoreType.add,
key, exp, String.valueOf(def));
try {
if(f.get(operationTimeout, TimeUnit.MILLISECONDS)) {
rv=def;
} else {
rv=mutate(t, key, by, 0, exp);
assert rv != -1 : "Failed to mutate or init value";
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted waiting for store", e);
} catch (ExecutionException e) {
throw new RuntimeException("Failed waiting for store", e);
} catch (TimeoutException e) {
throw new OperationTimeoutException(
"Timeout waiting to mutate or init value", e);
}
}
return rv;
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
private long mutateWithDefault(Mutator t, String key,
int by, long def, int exp) {
long rv=mutate(t, key, by, def, exp);
// The ascii protocol doesn't support defaults, so I added them
// manually here.
if(rv == -1) {
Future<Boolean> f=asyncStore(StoreType.add,
key, exp, String.valueOf(def));
try {
if(f.get(operationTimeout, TimeUnit.MILLISECONDS)) {
rv=def;
} else {
rv=mutate(t, key, by, 0, exp);
assert rv != -1 : "Failed to mutate or init value";
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted waiting for store", e);
} catch (ExecutionException e) {
throw new RuntimeException("Failed waiting for store", e);
} catch (TimeoutException e) {
throw new OperationTimeoutException(
"Timeout waiting to mutate or init value", e);
}
}
return rv;
}
代码示例来源:origin: naver/arcus-java-client
private long mutateWithDefault(Mutator t, String key,
int by, long def, int exp) {
long rv = mutate(t, key, by, def, exp);
// The ascii protocol doesn't support defaults, so I added them
// manually here.
if (rv == -1) {
Future<Boolean> f = asyncStore(StoreType.add,
key, exp, String.valueOf(def));
try {
if (f.get(operationTimeout, TimeUnit.MILLISECONDS)) {
rv = def;
} else {
rv = mutate(t, key, by, 0, exp);
assert rv != -1 : "Failed to mutate or init value";
}
} catch (InterruptedException e) {
throw new RuntimeException("Interrupted waiting for store", e);
} catch (ExecutionException e) {
throw new RuntimeException("Failed waiting for store", e);
} catch (TimeoutException e) {
throw new OperationTimeoutException(
"Timeout waiting to mutate or init value", e);
}
}
return rv;
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
Future<Boolean> f = asyncStore(StoreType.add, key, exp,
String.valueOf(def));
try {
内容来源于网络,如有侵权,请联系作者删除!