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
1b1decc9
Commit
1b1decc9
authored
Sep 19, 2016
by
Jason Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use tooling instead of tools
parent
33c59a5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ConfigUtil.java
...main/java/com/ctrip/framework/apollo/util/ConfigUtil.java
+4
-4
No files found.
apollo-client/src/main/java/com/ctrip/framework/apollo/util/ConfigUtil.java
View file @
1b1decc9
...
...
@@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit;
@Named
(
type
=
ConfigUtil
.
class
)
public
class
ConfigUtil
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ConfigUtil
.
class
);
private
static
final
String
TOOL
S_CLUSTER
=
"TOOLS
"
;
private
static
final
String
TOOL
ING_CLUSTER
=
"TOOLING
"
;
private
int
refreshInterval
=
5
;
private
TimeUnit
refreshIntervalTimeUnit
=
TimeUnit
.
MINUTES
;
private
int
connectTimeout
=
1000
;
//1 second
...
...
@@ -65,9 +65,9 @@ public class ConfigUtil {
//Load data center from system property
cluster
=
System
.
getProperty
(
ConfigConsts
.
APOLLO_CLUSTER_KEY
);
//Use TOOL
S cluster if tools
=true in server.properties
//Use TOOL
ING cluster if tooling
=true in server.properties
if
(
Strings
.
isNullOrEmpty
(
cluster
)
&&
isToolingZone
())
{
cluster
=
TOOL
S
_CLUSTER
;
cluster
=
TOOL
ING
_CLUSTER
;
}
//Use data center as cluster
...
...
@@ -82,7 +82,7 @@ public class ConfigUtil {
}
private
boolean
isToolingZone
()
{
if
(
"true"
.
equalsIgnoreCase
(
Foundation
.
server
().
getProperty
(
"tool
s
"
,
"false"
).
trim
()))
{
if
(
"true"
.
equalsIgnoreCase
(
Foundation
.
server
().
getProperty
(
"tool
ing
"
,
"false"
).
trim
()))
{
return
true
;
}
return
false
;
...
...
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