Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
solo
Commits
d21f3440
Commit
d21f3440
authored
Jul 24, 2012
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浏览计数写库时控制最大阀值
最大浏览统计
parent
53095c49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
core/src/main/java/org/b3log/solo/processor/StatProcessor.java
...src/main/java/org/b3log/solo/processor/StatProcessor.java
+3
-3
No files found.
core/src/main/java/org/b3log/solo/processor/StatProcessor.java
View file @
d21f3440
...
...
@@ -53,7 +53,7 @@ import org.json.JSONObject;
* <p>
*
* @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
* @version 1.0.1.
6, Jul 23
, 2012
* @version 1.0.1.
7, Jul 24
, 2012
* @since 0.4.0
*/
@RequestProcessor
...
...
@@ -78,7 +78,7 @@ public final class StatProcessor {
/**
* Flush size.
*/
private
static
final
int
FLUSH_SIZE
=
5
0
;
private
static
final
int
FLUSH_SIZE
=
3
0
;
/**
* Online visitor count refresher.
...
...
@@ -123,7 +123,7 @@ public final class StatProcessor {
final
Set
<
String
>
keys
=
PageCaches
.
getKeys
();
final
List
<
String
>
keyList
=
new
ArrayList
<
String
>(
keys
);
final
int
size
=
keys
.
size
()
>
FLUSH_SIZE
?
FLUSH_SIZE
:
keys
.
size
();
// Flush
20
articles at most
final
int
size
=
keys
.
size
()
>
FLUSH_SIZE
?
FLUSH_SIZE
:
keys
.
size
();
// Flush
FLUSH_SIZE
articles at most
final
List
<
Integer
>
idx
=
CollectionUtils
.
getRandomIntegers
(
0
,
keys
.
size
(),
size
);
final
Set
<
String
>
cachedPageKeys
=
new
HashSet
<
String
>();
...
...
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