mhansonp commented on a change in pull request #5281:
URL: https://github.com/apache/geode/pull/5281#discussion_r444638563
##########
File path:
geode-management/src/main/java/org/apache/geode/management/internal/operation/RestoreRedundancyResultsImpl.java
##########
@@ -38,24 +37,55 @@
public static final String PRIMARY_TRANSFER_TIME = "Total primary transfer
time (ms) = ";
private static final long serialVersionUID = -1174735246756963521L;
- protected Map<String, RegionRedundancyStatus> zeroRedundancyRegions = new
HashMap<>();
- protected Map<String, RegionRedundancyStatus> underRedundancyRegions = new
HashMap<>();
- protected Map<String, RegionRedundancyStatus> satisfiedRedundancyRegions =
new HashMap<>();
+ protected Map<String, RegionRedundancyStatus> zeroRedundancyRegionsResults =
new HashMap<>();
+ protected Map<String, RegionRedundancyStatus> underRedundancyRegionsResults
= new HashMap<>();
+ protected Map<String, RegionRedundancyStatus>
satisfiedRedundancyRegionsResults = new HashMap<>();
protected int totalPrimaryTransfersCompleted;
- protected Duration totalPrimaryTransferTime = Duration.ZERO;
+ protected long totalPrimaryTransferTime = 0;
protected boolean success = true;
protected String statusMessage;
protected final List<String> includedRegionsWithNoMembers = new
ArrayList<>();
+ private RegionRedundancyStatus regionResult;
+
+ public void setZeroRedundancyRegionsResults(
+ Map<String, RegionRedundancyStatus> zeroRedundancyRegionsResults) {
+ this.zeroRedundancyRegionsResults = zeroRedundancyRegionsResults;
+ }
+
+ public void setUnderRedundancyRegionsResults(
+ Map<String, RegionRedundancyStatus> underRedundancyRegionsResults) {
+ this.underRedundancyRegionsResults = underRedundancyRegionsResults;
+ }
+
+ public void setSatisfiedRedundancyRegionsResults(
+ Map<String, RegionRedundancyStatus> satisfiedRedundancyRegionsResults) {
+ this.satisfiedRedundancyRegionsResults = satisfiedRedundancyRegionsResults;
+ }
+
+ public void setTotalPrimaryTransfersCompleted(int
totalPrimaryTransfersCompleted) {
+ this.totalPrimaryTransfersCompleted = totalPrimaryTransfersCompleted;
+ }
+
+ public void setTotalPrimaryTransferTime(long totalPrimaryTransferTime) {
+ this.totalPrimaryTransferTime = totalPrimaryTransferTime;
+ }
+
+ public void setRegionResult(RegionRedundancyStatus regionResult) {
+ this.regionResult = regionResult;
+ }
+
+
+ public RestoreRedundancyResultsImpl() {}
public void addRegionResults(RestoreRedundancyResults results) {
-
satisfiedRedundancyRegions.putAll(results.getSatisfiedRedundancyRegionResults());
- underRedundancyRegions.putAll(results.getUnderRedundancyRegionResults());
- zeroRedundancyRegions.putAll(results.getZeroRedundancyRegionResults());
+
satisfiedRedundancyRegionsResults.putAll(results.getSatisfiedRedundancyRegionResults());
+
underRedundancyRegionsResults.putAll(results.getUnderRedundancyRegionResults());
+
zeroRedundancyRegionsResults.putAll(results.getZeroRedundancyRegionResults());
totalPrimaryTransfersCompleted +=
results.getTotalPrimaryTransfersCompleted();
totalPrimaryTransferTime =
- totalPrimaryTransferTime.plus(results.getTotalPrimaryTransferTime());
+ totalPrimaryTransferTime + results.getTotalPrimaryTransferTime();
Review comment:
done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]