Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_57962205
redisson
提交
54eaba09
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,发现更多精彩内容 >>
提交
54eaba09
编写于
11月 22, 2018
作者:
N
Nikita Koksharov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactoring
上级
144391ff
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
25 deletion
+22
-25
redisson-hibernate/redisson-hibernate-4/src/main/java/org/redisson/hibernate/RedissonRegionFactory.java
...in/java/org/redisson/hibernate/RedissonRegionFactory.java
+6
-6
redisson-hibernate/redisson-hibernate-5/src/main/java/org/redisson/hibernate/RedissonRegionFactory.java
...in/java/org/redisson/hibernate/RedissonRegionFactory.java
+6
-6
redisson-hibernate/redisson-hibernate-52/src/main/java/org/redisson/hibernate/RedissonRegionFactory.java
...in/java/org/redisson/hibernate/RedissonRegionFactory.java
+6
-6
redisson-hibernate/redisson-hibernate-53/src/main/java/org/redisson/hibernate/RedissonRegionFactory.java
...in/java/org/redisson/hibernate/RedissonRegionFactory.java
+4
-7
未找到文件。
redisson-hibernate/redisson-hibernate-4/src/main/java/org/redisson/hibernate/RedissonRegionFactory.java
浏览文件 @
54eaba09
...
...
@@ -182,7 +182,7 @@ public class RedissonRegionFactory implements RegionFactory {
throws
CacheException
{
log
.
debug
(
"Building entity cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
ENTITY_DEF
);
return
new
RedissonEntityRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
ENTITY_DEF
);
}
...
...
@@ -191,7 +191,7 @@ public class RedissonRegionFactory implements RegionFactory {
throws
CacheException
{
log
.
debug
(
"Building naturalId cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
NATURAL_ID_DEF
);
return
new
RedissonNaturalIdRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
NATURAL_ID_DEF
);
}
...
...
@@ -200,7 +200,7 @@ public class RedissonRegionFactory implements RegionFactory {
CacheDataDescription
metadata
)
throws
CacheException
{
log
.
debug
(
"Building collection cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
COLLECTION_DEF
);
return
new
RedissonCollectionRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
COLLECTION_DEF
);
}
...
...
@@ -208,7 +208,7 @@ public class RedissonRegionFactory implements RegionFactory {
public
QueryResultsRegion
buildQueryResultsRegion
(
String
regionName
,
Properties
properties
)
throws
CacheException
{
log
.
debug
(
"Building query cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
QUERY_DEF
);
return
new
RedissonQueryRegion
(
mapCache
,
this
,
properties
,
QUERY_DEF
);
}
...
...
@@ -216,11 +216,11 @@ public class RedissonRegionFactory implements RegionFactory {
public
TimestampsRegion
buildTimestampsRegion
(
String
regionName
,
Properties
properties
)
throws
CacheException
{
log
.
debug
(
"Building timestamps cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
TIMESTAMPS_DEF
);
return
new
RedissonTimestampsRegion
(
mapCache
,
this
,
properties
,
TIMESTAMPS_DEF
);
}
protected
RMapCache
<
Object
,
Object
>
getCache
(
String
regionName
,
Properties
properties
)
{
protected
RMapCache
<
Object
,
Object
>
getCache
(
String
regionName
,
Properties
properties
,
String
defaultKey
)
{
return
redisson
.
getMapCache
(
regionName
);
}
...
...
redisson-hibernate/redisson-hibernate-5/src/main/java/org/redisson/hibernate/RedissonRegionFactory.java
浏览文件 @
54eaba09
...
...
@@ -183,7 +183,7 @@ public class RedissonRegionFactory implements RegionFactory {
throws
CacheException
{
log
.
debug
(
"Building entity cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
ENTITY_DEF
);
return
new
RedissonEntityRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
ENTITY_DEF
);
}
...
...
@@ -192,7 +192,7 @@ public class RedissonRegionFactory implements RegionFactory {
throws
CacheException
{
log
.
debug
(
"Building naturalId cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
NATURAL_ID_DEF
);
return
new
RedissonNaturalIdRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
NATURAL_ID_DEF
);
}
...
...
@@ -201,7 +201,7 @@ public class RedissonRegionFactory implements RegionFactory {
CacheDataDescription
metadata
)
throws
CacheException
{
log
.
debug
(
"Building collection cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
COLLECTION_DEF
);
return
new
RedissonCollectionRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
COLLECTION_DEF
);
}
...
...
@@ -209,7 +209,7 @@ public class RedissonRegionFactory implements RegionFactory {
public
QueryResultsRegion
buildQueryResultsRegion
(
String
regionName
,
Properties
properties
)
throws
CacheException
{
log
.
debug
(
"Building query cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
QUERY_DEF
);
return
new
RedissonQueryRegion
(
mapCache
,
this
,
properties
,
QUERY_DEF
);
}
...
...
@@ -217,11 +217,11 @@ public class RedissonRegionFactory implements RegionFactory {
public
TimestampsRegion
buildTimestampsRegion
(
String
regionName
,
Properties
properties
)
throws
CacheException
{
log
.
debug
(
"Building timestamps cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
TIMESTAMPS_DEF
);
return
new
RedissonTimestampsRegion
(
mapCache
,
this
,
properties
,
TIMESTAMPS_DEF
);
}
protected
RMapCache
<
Object
,
Object
>
getCache
(
String
regionName
,
Properties
properties
)
{
protected
RMapCache
<
Object
,
Object
>
getCache
(
String
regionName
,
Properties
properties
,
String
defaultKey
)
{
return
redisson
.
getMapCache
(
regionName
);
}
...
...
redisson-hibernate/redisson-hibernate-52/src/main/java/org/redisson/hibernate/RedissonRegionFactory.java
浏览文件 @
54eaba09
...
...
@@ -183,7 +183,7 @@ public class RedissonRegionFactory implements RegionFactory {
throws
CacheException
{
log
.
debug
(
"Building entity cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
ENTITY_DEF
);
return
new
RedissonEntityRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
ENTITY_DEF
);
}
...
...
@@ -192,7 +192,7 @@ public class RedissonRegionFactory implements RegionFactory {
throws
CacheException
{
log
.
debug
(
"Building naturalId cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
NATURAL_ID_DEF
);
return
new
RedissonNaturalIdRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
NATURAL_ID_DEF
);
}
...
...
@@ -201,7 +201,7 @@ public class RedissonRegionFactory implements RegionFactory {
CacheDataDescription
metadata
)
throws
CacheException
{
log
.
debug
(
"Building collection cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
COLLECTION_DEF
);
return
new
RedissonCollectionRegion
(
mapCache
,
this
,
metadata
,
settings
,
properties
,
COLLECTION_DEF
);
}
...
...
@@ -209,7 +209,7 @@ public class RedissonRegionFactory implements RegionFactory {
public
QueryResultsRegion
buildQueryResultsRegion
(
String
regionName
,
Properties
properties
)
throws
CacheException
{
log
.
debug
(
"Building query cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
QUERY_DEF
);
return
new
RedissonQueryRegion
(
mapCache
,
this
,
properties
,
QUERY_DEF
);
}
...
...
@@ -217,11 +217,11 @@ public class RedissonRegionFactory implements RegionFactory {
public
TimestampsRegion
buildTimestampsRegion
(
String
regionName
,
Properties
properties
)
throws
CacheException
{
log
.
debug
(
"Building timestamps cache region: "
+
regionName
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
);
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
properties
,
TIMESTAMPS_DEF
);
return
new
RedissonTimestampsRegion
(
mapCache
,
this
,
properties
,
TIMESTAMPS_DEF
);
}
protected
RMapCache
<
Object
,
Object
>
getCache
(
String
regionName
,
Properties
properties
)
{
protected
RMapCache
<
Object
,
Object
>
getCache
(
String
regionName
,
Properties
properties
,
String
defaultKey
)
{
return
redisson
.
getMapCache
(
regionName
);
}
...
...
redisson-hibernate/redisson-hibernate-53/src/main/java/org/redisson/hibernate/RedissonRegionFactory.java
浏览文件 @
54eaba09
...
...
@@ -33,7 +33,6 @@ import org.hibernate.cache.spi.support.RegionFactoryTemplate;
import
org.hibernate.cache.spi.support.StorageAccess
;
import
org.hibernate.engine.spi.SessionFactoryImplementor
;
import
org.hibernate.internal.util.config.ConfigurationHelper
;
import
org.jboss.logging.Logger
;
import
org.redisson.Redisson
;
import
org.redisson.api.RMapCache
;
import
org.redisson.api.RScript
;
...
...
@@ -48,8 +47,6 @@ import org.redisson.config.Config;
*/
public
class
RedissonRegionFactory
extends
RegionFactoryTemplate
{
private
static
final
Logger
log
=
Logger
.
getLogger
(
RedissonRegionFactory
.
class
);
private
static
final
long
serialVersionUID
=
3785315696581773811L
;
public
static
final
String
QUERY_DEF
=
"query"
;
...
...
@@ -199,25 +196,25 @@ public class RedissonRegionFactory extends RegionFactoryTemplate {
throw
new
IllegalArgumentException
(
"Unable to determine entity cache type!"
);
}
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionConfig
.
getRegionName
(),
buildingContext
.
getSessionFactory
().
getProperties
());
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionConfig
.
getRegionName
(),
buildingContext
.
getSessionFactory
().
getProperties
()
,
defaultKey
);
return
new
RedissonStorage
(
mapCache
,
buildingContext
.
getSessionFactory
().
getProperties
(),
defaultKey
);
}
@Override
protected
StorageAccess
createQueryResultsRegionStorageAccess
(
String
regionName
,
SessionFactoryImplementor
sessionFactory
)
{
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
sessionFactory
.
getProperties
());
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
sessionFactory
.
getProperties
()
,
QUERY_DEF
);
return
new
RedissonStorage
(
mapCache
,
sessionFactory
.
getProperties
(),
QUERY_DEF
);
}
@Override
protected
StorageAccess
createTimestampsRegionStorageAccess
(
String
regionName
,
SessionFactoryImplementor
sessionFactory
)
{
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
sessionFactory
.
getProperties
());
RMapCache
<
Object
,
Object
>
mapCache
=
getCache
(
regionName
,
sessionFactory
.
getProperties
()
,
TIMESTAMPS_DEF
);
return
new
RedissonStorage
(
mapCache
,
sessionFactory
.
getProperties
(),
TIMESTAMPS_DEF
);
}
protected
RMapCache
<
Object
,
Object
>
getCache
(
String
regionName
,
Map
properties
)
{
protected
RMapCache
<
Object
,
Object
>
getCache
(
String
regionName
,
Map
properties
,
String
defaultKey
)
{
return
redisson
.
getMapCache
(
regionName
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录