Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
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
openSource
apollo
Commits
9e6aa021
Commit
9e6aa021
authored
Apr 29, 2016
by
Jason Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make counter random
parent
d0d412c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
ReleaseKeyGenerator.java
.../java/com/ctrip/apollo/biz/utils/ReleaseKeyGenerator.java
+2
-1
No files found.
apollo-biz/src/main/java/com/ctrip/apollo/biz/utils/ReleaseKeyGenerator.java
View file @
9e6aa021
...
...
@@ -6,6 +6,7 @@ import com.ctrip.apollo.biz.entity.Namespace;
import
com.ctrip.apollo.core.utils.ByteUtil
;
import
com.ctrip.apollo.core.utils.MachineUtil
;
import
java.security.SecureRandom
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
...
...
@@ -17,7 +18,7 @@ import java.util.concurrent.atomic.AtomicInteger;
*/
public
class
ReleaseKeyGenerator
{
private
static
final
DateFormat
TIMESTAMP_FORMAT
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
private
static
final
AtomicInteger
releaseCounter
=
new
AtomicInteger
();
private
static
final
AtomicInteger
releaseCounter
=
new
AtomicInteger
(
new
SecureRandom
().
nextInt
()
);
private
static
final
Joiner
KEY_JOINER
=
Joiner
.
on
(
"-"
);
/**
...
...
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