Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gechengyang
nouiWithSpringMVC
Commits
ecadd0e6
Commit
ecadd0e6
authored
Apr 21, 2021
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将计算总数大小顺序调整至查数之后
parent
e27ae168
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
AbstractCache.java
...n/java/org/sss/presentation/noui/cache/AbstractCache.java
+14
-11
No files found.
src/main/java/org/sss/presentation/noui/cache/AbstractCache.java
View file @
ecadd0e6
...
@@ -29,17 +29,7 @@ public abstract class AbstractCache implements CacheController {
...
@@ -29,17 +29,7 @@ public abstract class AbstractCache implements CacheController {
public
CacheList
cacheRead
(
CacheKey
cacheKey
,
long
keepAlive
,
int
maxSize
,
int
offset
)
{
public
CacheList
cacheRead
(
CacheKey
cacheKey
,
long
keepAlive
,
int
maxSize
,
int
offset
)
{
Object
o
=
cacheKey
.
getKey
();
Object
o
=
cacheKey
.
getKey
();
String
fullSizeKey
=
generateKey
(
o
);
String
fullSizeKey
=
generateKey
(
o
);
Integer
fullSize
=
(
Integer
)
doCacheRead
(
fullSizeKey
);
if
(
fullSize
==
null
)
fullSize
=
0
;
if
(
fullSize
==
0
)
{
try
{
fullSize
=
cacheKey
.
getFullSize
();
doCacheWrite
(
fullSizeKey
,
fullSize
,
keepAlive
);
}
catch
(
Exception
e
)
{
throw
new
NoUiException
(
"["
+
this
.
cacheName
+
"]执行getFullSize时出现异常"
,
e
);
}
}
String
valKey
=
generateValKey
(
o
,
maxSize
,
offset
);
String
valKey
=
generateValKey
(
o
,
maxSize
,
offset
);
Object
lstobj
=
doCacheRead
(
valKey
);
Object
lstobj
=
doCacheRead
(
valKey
);
List
lst
=
null
;
List
lst
=
null
;
...
@@ -85,6 +75,19 @@ public abstract class AbstractCache implements CacheController {
...
@@ -85,6 +75,19 @@ public abstract class AbstractCache implements CacheController {
doCacheWrite
(
valKey
,
lst
,
keepAlive
);
doCacheWrite
(
valKey
,
lst
,
keepAlive
);
}
}
}
}
Integer
fullSize
=
(
Integer
)
doCacheRead
(
fullSizeKey
);
if
(
fullSize
==
null
)
fullSize
=
0
;
if
(
fullSize
==
0
)
{
try
{
fullSize
=
cacheKey
.
getFullSize
();
doCacheWrite
(
fullSizeKey
,
fullSize
,
keepAlive
);
}
catch
(
Exception
e
)
{
throw
new
NoUiException
(
"["
+
this
.
cacheName
+
"]执行getFullSize时出现异常"
,
e
);
}
}
return
new
CacheList
(
lst
,
fullSize
);
return
new
CacheList
(
lst
,
fullSize
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment