-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support incremental configuration synchronization client
- Loading branch information
1 parent
21259e5
commit f654cb3
Showing
7 changed files
with
356 additions
and
9 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
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
64 changes: 64 additions & 0 deletions
64
apollo-core/src/main/java/com/ctrip/framework/apollo/core/dto/ConfigurationChange.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,64 @@ | ||
/* | ||
* Copyright 2022 Apollo Authors | ||
* | ||
* 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.ctrip.framework.apollo.core.dto; | ||
|
||
|
||
import com.ctrip.framework.apollo.core.enums.ConfigurationChangeType; | ||
|
||
/** | ||
* Holds the information for a Configuration change. | ||
* @author jason | ||
*/ | ||
public class ConfigurationChange { | ||
private final String key; | ||
private final String newValue; | ||
private final ConfigurationChangeType configurationChangeType; | ||
|
||
/** | ||
* Constructor. | ||
* @param key the key whose value is changed | ||
* @param newValue the value after change | ||
* @param configurationChangeType the change type | ||
*/ | ||
public ConfigurationChange(String key, String newValue, ConfigurationChangeType configurationChangeType) { | ||
this.key = key; | ||
this.newValue = newValue; | ||
this.configurationChangeType = configurationChangeType; | ||
} | ||
|
||
public String getKey() { | ||
return key; | ||
} | ||
public String getNewValue() { | ||
return newValue; | ||
} | ||
|
||
public ConfigurationChangeType getConfigurationChangeType() { | ||
return configurationChangeType; | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("ConfigChange{"); | ||
sb.append(" key='").append(key).append('\''); | ||
sb.append(", newValue='").append(newValue).append('\''); | ||
sb.append(", configurationChangeType=").append(configurationChangeType); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
} |
Oops, something went wrong.