Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
c312a2dd
提交
c312a2dd
authored
10月 15, 2012
作者:
noelgrandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor spelling and grammar fixes
上级
f4e7837e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
+5
-5
CacheConcurrentLIRS.java
h2/src/tools/org/h2/dev/store/btree/CacheConcurrentLIRS.java
+5
-5
没有找到文件。
h2/src/tools/org/h2/dev/store/btree/CacheConcurrentLIRS.java
浏览文件 @
c312a2dd
...
...
@@ -18,7 +18,7 @@ import java.util.Set;
* A scan resistant cache. It is meant to cache objects that are relatively
* costly to acquire, for example file content.
* <p>
* This implementation is multi-threading sa
v
e and supports concurrent access.
* This implementation is multi-threading sa
f
e and supports concurrent access.
* Null keys or null values are not allowed. The map fill factor is at most 75%.
* <p>
* Each entry is assigned a distinct memory size, and the cache will try to use
...
...
@@ -84,7 +84,7 @@ public class CacheConcurrentLIRS<K, V> extends AbstractMap<K, V> implements Map<
/**
* Check whether there is a resident entry for the given key. This method
* does not adjust
s
the internal state of the cache.
* does not adjust the internal state of the cache.
*
* @param key the key (may not be null)
* @return true if there is a resident entry
...
...
@@ -321,7 +321,7 @@ public class CacheConcurrentLIRS<K, V> extends AbstractMap<K, V> implements Map<
}
/**
* Get the list of keys. This method allows
to view
the internal state of
* Get the list of keys. This method allows
a view of
the internal state of
* the cache.
*
* @param cold if true, only keys for the cold entries are returned
...
...
@@ -477,7 +477,7 @@ public class CacheConcurrentLIRS<K, V> extends AbstractMap<K, V> implements Map<
V
get
(
Object
key
,
int
hash
)
{
Entry
<
K
,
V
>
e
=
find
(
key
,
hash
);
if
(
e
==
null
)
{
//
either
the entry was not found
// the entry was not found
return
null
;
}
V
value
=
e
.
value
;
...
...
@@ -511,7 +511,7 @@ public class CacheConcurrentLIRS<K, V> extends AbstractMap<K, V> implements Map<
if
(
e
.
isHot
())
{
if
(
e
!=
stack
.
stackNext
)
{
if
(
stackMoveDistance
==
0
||
stackMoveCounter
-
e
.
topMove
>
stackMoveDistance
)
{
// move a hot entr
ies
to the top of the stack
// move a hot entr
y
to the top of the stack
// unless it is already there
boolean
wasEnd
=
e
==
stack
.
stackPrev
;
removeFromStack
(
e
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论