本文整理汇总了Java中com.lambdaworks.redis.RedisFuture类的典型用法代码示例。如果您正苦于以下问题:Java RedisFuture类的具体用法?Java RedisFuture怎么用?Java RedisFuture使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RedisFuture类属于com.lambdaworks.redis包,在下文中一共展示了RedisFuture类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: configRewrite
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
public void configRewrite(BiConsumer<String, Throwable> consumer) {
Consumer<StatefulRedisConnection> connectionConsumer = new Consumer<StatefulRedisConnection>() {
@Override
public void accept(StatefulRedisConnection statefulRedisConnection) {
RedisFuture<String> redisFuture = statefulRedisConnection.async().configRewrite();
redisFuture.whenCompleteAsync(consumer, executors);
}
};
asyncExecute(connectionConsumer, null);
}
开发者ID:ctripcorp,项目名称:x-pipe,代码行数:11,代码来源:RedisSession.java
示例2: testAsyncCommand
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Test
public void testAsyncCommand() throws Exception {
RedisFuture<String> ping = disque.getConnection().async().ping();
assertThat(ping).isInstanceOf(AsyncCommand.class);
assertThat(ping.isCancelled()).isFalse();
assertThat(ping.getError()).isNull();
assertThat(ping.get(1, TimeUnit.MINUTES)).isEqualTo("PONG");
}
开发者ID:mp911de,项目名称:spinach,代码行数:10,代码来源:AsyncCommandTest.java
示例3: commandInfo
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<List<Object>> commandInfo(CommandType... commands) {
String[] stringCommands = new String[commands.length];
for (int i = 0; i < commands.length; i++) {
stringCommands[i] = commands[i].name();
}
return commandInfo(stringCommands);
}
开发者ID:mp911de,项目名称:spinach,代码行数:10,代码来源:DisqueAsyncCommandsImpl.java
示例4: testSameResultType
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Test
public void testSameResultType() throws Exception {
Method method = asyncClass.getMethod(this.method.getName(), this.method.getParameterTypes());
Class<?> returnType = method.getReturnType();
if (returnType.equals(RedisFuture.class)) {
ParameterizedType genericReturnType = (ParameterizedType) method.getGenericReturnType();
Type[] actualTypeArguments = genericReturnType.getActualTypeArguments();
if (actualTypeArguments[0] instanceof TypeVariable) {
assertThat(Object.class).isEqualTo(this.method.getReturnType());
return;
}
if (actualTypeArguments[0] instanceof ParameterizedType) {
ParameterizedType parameterizedType = (ParameterizedType) actualTypeArguments[0];
returnType = (Class<?>) parameterizedType.getRawType();
} else if (actualTypeArguments[0] instanceof GenericArrayType) {
GenericArrayType arrayType = (GenericArrayType) actualTypeArguments[0];
returnType = Array.newInstance((Class<?>) arrayType.getGenericComponentType(), 0).getClass();
} else {
returnType = (Class<?>) actualTypeArguments[0];
}
}
Class<?> expectedType = getType(this.method.getReturnType());
returnType = getType(returnType);
assertThat(returnType).describedAs(this.method.toString()).isEqualTo(expectedType);
}
开发者ID:mp911de,项目名称:spinach,代码行数:35,代码来源:SyncAsyncApiConvergenceTest.java
示例5: working
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<Long> working(String jobId) {
return dispatch(commandBuilder.working(jobId));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例6: hello
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<List<Object>> hello() {
return dispatch(commandBuilder.hello());
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例7: qstat
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<Map<String, Object>> qstat(K queue) {
return dispatch(commandBuilder.qstat(queue));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例8: slowlogGet
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<List<Object>> slowlogGet(int count) {
return dispatch(commandBuilder.slowlogGet(count));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例9: info
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<String> info() {
return dispatch(commandBuilder.info());
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例10: ping
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<String> ping() {
return dispatch(commandBuilder.ping());
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例11: jscan
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<KeyScanCursor<String>> jscan(ScanCursor scanCursor, JScanArgs<K> scanArgs) {
return dispatch(commandBuilder.jscan(scanCursor, scanArgs));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例12: qscan
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<KeyScanCursor<K>> qscan(ScanCursor scanCursor, QScanArgs scanArgs) {
return dispatch(commandBuilder.qscan(scanCursor, scanArgs));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例13: getjobs
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<List<Job<K, V>>> getjobs(long duration, TimeUnit timeUnit, long count, K... queues) {
GetJobArgs args = GetJobArgs.builder().timeout(duration, timeUnit).build();
return dispatch(commandBuilder.getjobs(count, args, queues));
}
开发者ID:mp911de,项目名称:spinach,代码行数:6,代码来源:DisqueAsyncCommandsImpl.java
示例14: pause
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<String> pause(K queue, PauseArgs pauseArgs) {
return dispatch(commandBuilder.pause(queue, pauseArgs));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例15: slowlogReset
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<String> slowlogReset() {
return dispatch(commandBuilder.slowlogReset());
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例16: quit
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<String> quit() {
return dispatch(commandBuilder.quit());
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例17: ackjob
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<Long> ackjob(String... jobIds) {
return dispatch(commandBuilder.ackjob(jobIds));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例18: addjob
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<String> addjob(K queue, V job, long commandTimeout, TimeUnit timeUnit) {
return dispatch(commandBuilder.addjob(queue, job, commandTimeout, timeUnit, null));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例19: auth
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<String> auth(String password) {
return dispatch(commandBuilder.auth(password));
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
示例20: clientGetname
import com.lambdaworks.redis.RedisFuture; //导入依赖的package包/类
@Override
public RedisFuture<K> clientGetname() {
return dispatch(commandBuilder.clientGetname());
}
开发者ID:mp911de,项目名称:spinach,代码行数:5,代码来源:DisqueAsyncCommandsImpl.java
注:本文中的com.lambdaworks.redis.RedisFuture类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论