Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_57962205
redisson
提交
4a41bfef
R
redisson
项目概览
weixin_57962205
/
redisson
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redisson
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4a41bfef
编写于
2月 21, 2020
作者:
N
Nikita Koksharov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Feature - Add RBucketsReactive and RBucketsRx objects #2604
上级
aeb4567a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
169 addition
and
0 deletion
+169
-0
redisson/src/main/java/org/redisson/RedissonReactive.java
redisson/src/main/java/org/redisson/RedissonReactive.java
+10
-0
redisson/src/main/java/org/redisson/RedissonRx.java
redisson/src/main/java/org/redisson/RedissonRx.java
+10
-0
redisson/src/main/java/org/redisson/api/RBucketsReactive.java
...sson/src/main/java/org/redisson/api/RBucketsReactive.java
+58
-0
redisson/src/main/java/org/redisson/api/RBucketsRx.java
redisson/src/main/java/org/redisson/api/RBucketsRx.java
+59
-0
redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java
...rc/main/java/org/redisson/api/RedissonReactiveClient.java
+16
-0
redisson/src/main/java/org/redisson/api/RedissonRxClient.java
...sson/src/main/java/org/redisson/api/RedissonRxClient.java
+16
-0
未找到文件。
redisson/src/main/java/org/redisson/RedissonReactive.java
浏览文件 @
4a41bfef
...
...
@@ -159,6 +159,16 @@ public class RedissonReactive implements RedissonReactiveClient {
return
ReactiveProxyBuilder
.
create
(
commandExecutor
,
new
RedissonBucket
<
V
>(
codec
,
commandExecutor
,
name
),
RBucketReactive
.
class
);
}
@Override
public
RBucketsReactive
getBuckets
()
{
return
ReactiveProxyBuilder
.
create
(
commandExecutor
,
new
RedissonBuckets
(
commandExecutor
),
RBucketsReactive
.
class
);
}
@Override
public
RBucketsReactive
getBuckets
(
Codec
codec
)
{
return
ReactiveProxyBuilder
.
create
(
commandExecutor
,
new
RedissonBuckets
(
codec
,
commandExecutor
),
RBucketsReactive
.
class
);
}
@Override
public
<
V
>
List
<
RBucketReactive
<
V
>>
findBuckets
(
String
pattern
)
{
RKeys
redissonKeys
=
new
RedissonKeys
(
commandExecutor
);
...
...
redisson/src/main/java/org/redisson/RedissonRx.java
浏览文件 @
4a41bfef
...
...
@@ -147,6 +147,16 @@ public class RedissonRx implements RedissonRxClient {
return
RxProxyBuilder
.
create
(
commandExecutor
,
new
RedissonBucket
<
V
>(
codec
,
commandExecutor
,
name
),
RBucketRx
.
class
);
}
@Override
public
RBucketsRx
getBuckets
()
{
return
RxProxyBuilder
.
create
(
commandExecutor
,
new
RedissonBuckets
(
commandExecutor
),
RBucketsRx
.
class
);
}
@Override
public
RBucketsRx
getBuckets
(
Codec
codec
)
{
return
RxProxyBuilder
.
create
(
commandExecutor
,
new
RedissonBuckets
(
codec
,
commandExecutor
),
RBucketsRx
.
class
);
}
@Override
public
<
V
>
RHyperLogLogRx
<
V
>
getHyperLogLog
(
String
name
)
{
return
RxProxyBuilder
.
create
(
commandExecutor
,
new
RedissonHyperLogLog
<
V
>(
commandExecutor
,
name
),
RHyperLogLogRx
.
class
);
...
...
redisson/src/main/java/org/redisson/api/RBucketsReactive.java
0 → 100644
浏览文件 @
4a41bfef
/**
* Copyright (c) 2013-2020 Nikita Koksharov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.redisson.api
;
import
reactor.core.publisher.Mono
;
import
java.util.Map
;
/**
* Operations over multiple Bucket objects.
*
* @author Nikita Koksharov
*
*/
public
interface
RBucketsReactive
{
/**
* Returns Redis object mapped by key. Result Map is not contains
* key-value entry for null values.
*
* @param <V> type of value
* @param keys - keys
* @return Map with name of bucket as key and bucket as value
*/
<
V
>
Mono
<
Map
<
String
,
V
>>
get
(
String
...
keys
);
/**
* Try to save objects mapped by Redis key.
* If at least one of them is already exist then
* don't set none of them.
*
* @param buckets - map of buckets
* @return <code>true</code> if object has been set otherwise <code>false</code>
*/
Mono
<
Boolean
>
trySet
(
Map
<
String
,
?>
buckets
);
/**
* Saves objects mapped by Redis key.
*
* @param buckets - map of buckets
* @return void
*/
Mono
<
Void
>
set
(
Map
<
String
,
?>
buckets
);
}
redisson/src/main/java/org/redisson/api/RBucketsRx.java
0 → 100644
浏览文件 @
4a41bfef
/**
* Copyright (c) 2013-2020 Nikita Koksharov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.redisson.api
;
import
io.reactivex.Completable
;
import
io.reactivex.Single
;
import
java.util.Map
;
/**
* Operations over multiple Bucket objects.
*
* @author Nikita Koksharov
*
*/
public
interface
RBucketsRx
{
/**
* Returns Redis object mapped by key. Result Map is not contains
* key-value entry for null values.
*
* @param <V> type of value
* @param keys - keys
* @return Map with name of bucket as key and bucket as value
*/
<
V
>
Single
<
Map
<
String
,
V
>>
get
(
String
...
keys
);
/**
* Try to save objects mapped by Redis key.
* If at least one of them is already exist then
* don't set none of them.
*
* @param buckets - map of buckets
* @return <code>true</code> if object has been set otherwise <code>false</code>
*/
Single
<
Boolean
>
trySet
(
Map
<
String
,
?>
buckets
);
/**
* Saves objects mapped by Redis key.
*
* @param buckets - map of buckets
* @return void
*/
Completable
set
(
Map
<
String
,
?>
buckets
);
}
redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java
浏览文件 @
4a41bfef
...
...
@@ -255,6 +255,22 @@ public interface RedissonReactiveClient {
*/
<
V
>
RBucketReactive
<
V
>
getBucket
(
String
name
,
Codec
codec
);
/**
* Returns interface for mass operations with Bucket objects.
*
* @return Buckets
*/
RBucketsReactive
getBuckets
();
/**
* Returns interface for mass operations with Bucket objects
* using provided codec for object.
*
* @param codec - codec for bucket objects
* @return Buckets
*/
RBucketsReactive
getBuckets
(
Codec
codec
);
/**
* Returns a list of object holder instances by a key pattern
*
...
...
redisson/src/main/java/org/redisson/api/RedissonRxClient.java
浏览文件 @
4a41bfef
...
...
@@ -253,6 +253,22 @@ public interface RedissonRxClient {
*/
<
V
>
RBucketRx
<
V
>
getBucket
(
String
name
,
Codec
codec
);
/**
* Returns interface for mass operations with Bucket objects.
*
* @return Buckets
*/
RBucketsRx
getBuckets
();
/**
* Returns interface for mass operations with Bucket objects
* using provided codec for object.
*
* @param codec - codec for bucket objects
* @return Buckets
*/
RBucketsRx
getBuckets
(
Codec
codec
);
/**
* Returns HyperLogLog instance by name.
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录