热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

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

本文整理了Java中net.spy.memcached.internal.GetFuture.<init>()方法的一些代码示例,展示了GetF

本文整理了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,

推荐阅读
author-avatar
LaravelChen
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有