-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE#3658] Move distro sync code to nacos-core module (#3750)
* Move distro sync code to nacos-core module * Update unit test
- Loading branch information
1 parent
043a504
commit 37bb909
Showing
40 changed files
with
306 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
core/src/main/java/com/alibaba/nacos/core/distributed/distro/DistroConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Copyright 1999-2018 Alibaba Group Holding Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.alibaba.nacos.core.distributed.distro; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* Distro configuration. | ||
* | ||
* @author xiweng.yy | ||
*/ | ||
@Component | ||
public class DistroConfig { | ||
|
||
@Value("${nacos.core.protocol.distro.data.sync_delay_ms:1000}") | ||
private long syncDelayMillis = 1000; | ||
|
||
@Value("${nacos.core.protocol.distro.data.sync_retry_delay_ms:3000}") | ||
private long syncRetryDelayMillis = 3000; | ||
|
||
@Value("${nacos.core.protocol.distro.data.verify_interval_ms:5000}") | ||
private long verifyIntervalMillis = 5000; | ||
|
||
@Value("${nacos.core.protocol.distro.data.load_retry_delay_ms:30000}") | ||
private long loadDataRetryDelayMillis = 30000; | ||
|
||
public long getSyncDelayMillis() { | ||
return syncDelayMillis; | ||
} | ||
|
||
public void setSyncDelayMillis(long syncDelayMillis) { | ||
this.syncDelayMillis = syncDelayMillis; | ||
} | ||
|
||
public long getSyncRetryDelayMillis() { | ||
return syncRetryDelayMillis; | ||
} | ||
|
||
public void setSyncRetryDelayMillis(long syncRetryDelayMillis) { | ||
this.syncRetryDelayMillis = syncRetryDelayMillis; | ||
} | ||
|
||
public long getVerifyIntervalMillis() { | ||
return verifyIntervalMillis; | ||
} | ||
|
||
public void setVerifyIntervalMillis(long verifyIntervalMillis) { | ||
this.verifyIntervalMillis = verifyIntervalMillis; | ||
} | ||
|
||
public long getLoadDataRetryDelayMillis() { | ||
return loadDataRetryDelayMillis; | ||
} | ||
|
||
public void setLoadDataRetryDelayMillis(long loadDataRetryDelayMillis) { | ||
this.loadDataRetryDelayMillis = loadDataRetryDelayMillis; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.