-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GEODE-8856: Persist gateway-sender startup-action
New startup-action parameter with values "stop", "pause" and "start" is now persisted during the runtime when following commands are issued: pause gateway-sender --> startup-action="pause" stop gateway-sender --> startup-action="stop" start gateway-sender --> startup-action="start" resume gateway-sender --> startup-action="start" Parameter is not updated and persisted when commands are executed per member as cluster configuration is not updated in that case. New startup-action parameter will now inter-work with manual-start in a following way: - If manual-start="true" and startup-action parameter is missing, then gateway sender will require manual start (same as before). - If manual-start is not set (or "false") and startup-action parameter is missing, then gateway sender will be started automatically (same as before). - If parameter startup-action is available in cluster configuration at startup, then gateway-sender will try to reach that state regardless of manual-start parameter value.
- Loading branch information
Showing
61 changed files
with
3,664 additions
and
432 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
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
63 changes: 63 additions & 0 deletions
63
geode-core/src/main/java/org/apache/geode/cache/wan/GatewaySenderStartupAction.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,63 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license | ||
* agreements. See the NOTICE file distributed with this work for additional information regarding | ||
* copyright ownership. The ASF licenses this file to You 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 org.apache.geode.cache.wan; | ||
|
||
/* | ||
* GatewaySenderStartupAction is persisted in cluster configuration when start, stop, pause or | ||
* resume gateway-sender command is successfully executed. At startup member will read persisted | ||
* startup-action parameter and act accordingly. | ||
*/ | ||
public enum GatewaySenderStartupAction { | ||
/* | ||
* This action ("start") is persisted in cluster configuration after | ||
* start or resume gateway-sender command is successfully executed. | ||
* At startup member will start gateway sender. When set then | ||
* this parameter has advantage over manual-start parameter. | ||
*/ | ||
START("start"), | ||
/* | ||
* This action ("stop") is persisted in cluster configuration after | ||
* stop gateway-sender command is successfully executed. At startup | ||
* member will not start gateway-sender, but only recover | ||
* gateway queues from persistent storage if needed. When set then | ||
* this parameter has advantage over manual-start parameter. | ||
*/ | ||
STOP("stop"), | ||
/* | ||
* This action ("pause") is persisted in cluster configuration after | ||
* pause gateway-sender command is successfully executed. At startup | ||
* member will start gateway-sender in paused state. When set then | ||
* this parameter has advantage over manual-start parameter. | ||
*/ | ||
PAUSE("pause"), | ||
/* | ||
* Used when startup-action parameter is not available in cluster configuration. | ||
*/ | ||
NONE("none"); | ||
|
||
private String action; | ||
|
||
GatewaySenderStartupAction(String action) { | ||
this.action = action; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "GatewaySenderStartupAction {" + | ||
"action='" + action + '\'' + | ||
'}'; | ||
} | ||
} |
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.