• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RedisFuture类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RememberMeCredential类代码示例发布时间:2022-05-23
下一篇:
Java DuplicateConnectionException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap