作者:LaravelChen | 来源:互联网 | 2023-09-17 20:55
本文整理了Java中net.spy.memcached.internal.GetFuture.()
方法的一些代码示例,展示了GetFuture.()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GetFuture.()
方法的具体详情如下:
包路径:net.spy.memcached.internal.GetFuture
类名称:GetFuture
方法名:
GetFuture.介绍
暂无
代码示例
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
final GetFuture rv = new GetFuture(latch, operationTimeout, key);
Operation op = opFact.get(key, new GetOperation.Callback() {
private Future val = null;
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
final GetFuture rv=new GetFuture(latch, operationTimeout);
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
/**
* Get the given key asynchronously.
*
* @param key the key to fetch
* @param tc the transcoder to serialize and unserialize value
* @return a future that will hold the return value of the fetch
* @throws IllegalStateException in the rare circumstance where queue
* is too full to accept any more requests
*/
public Future asyncGet(final String key, final Transcoder tc) {
final CountDownLatch latch=new CountDownLatch(1);
final GetFuture rv=new GetFuture(latch, operationTimeout);
Operation op=opFact.get(key,
new GetOperation.Callback() {
private Future val=null;
public void receivedStatus(OperationStatus status) {
rv.set(val);
}
public void gotData(String k, int flags, byte[] data) {
assert key.equals(k) : "Wrong key returned";
val=tcService.decode(tc,
new CachedData(flags, data, tc.getMaxSize()));
}
public void complete() {
latch.countDown();
}});
rv.setOperation(op);
addOp(key, op);
return rv;
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
final GetFuture rv = new GetFuture(latch, operationTimeout, key, executorService);
Operation op = opFact.get(key, new GetOperation.Callback() {
private Future val = null;
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
final GetFuture rv = new GetFuture(latch, operationTimeout, key,
executorService);
Operation op = opFact.get(key, new GetOperation.Callback() {
代码示例来源:origin: naver/arcus-java-client
final GetFuture rv = new GetFuture(latch, operationTimeout);
代码示例来源:origin: net.spy/spymemcached
final GetFuture rv = new GetFuture(latch, operationTimeout, key,
executorService);
Operation op = opFact.get(key, new GetOperation.Callback() {
代码示例来源:origin: com.couchbase.client/couchbase-client
final CountDownLatch latch = new CountDownLatch(1);
final GetFuture rv =
new GetFuture(latch, operationTimeout, key, executorService);
Operation op = createOperationForReplicaGet(key, rv, replicaFuture,
latch, tc, index, true);
final GetFuture additiOnalActiveGet= new GetFuture(latch, operationTimeout, key,
executorService);
Operation op = createOperationForReplicaGet(key, additionalActiveGet,