Repository: stratos Updated Branches: refs/heads/master 40c3f5dc1 -> fd3962328
Removing commented code Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/fd396232 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/fd396232 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/fd396232 Branch: refs/heads/master Commit: fd39623282e69fdb7f18df784a56b4294cfedb9f Parents: 40c3f5d Author: Lahiru Sandaruwan <[email protected]> Authored: Fri Nov 28 18:09:33 2014 +0530 Committer: Lahiru Sandaruwan <[email protected]> Committed: Fri Nov 28 18:09:33 2014 +0530 ---------------------------------------------------------------------- .../autoscaler/NetworkPartitionLbHolder.java | 289 ------------------- 1 file changed, 289 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/fd396232/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java index 99949f4..20bac91 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/NetworkPartitionLbHolder.java @@ -186,22 +186,6 @@ public class NetworkPartitionLbHolder implements Serializable{ } -// public int getMinInstanceCount() { -// return minInstanceCount; -// } -// -// public void setMinInstanceCount(int minInstanceCount) { -// this.minInstanceCount = minInstanceCount; -// } -// -// public int getMaxInstanceCount() { -// return maxInstanceCount; -// } -// -// public void setMaxInstanceCount(int maxInstanceCount) { -// this.maxInstanceCount = maxInstanceCount; -// } - public int hashCode() { final int prime = 31; @@ -234,197 +218,6 @@ public class NetworkPartitionLbHolder implements Serializable{ return true; } - - -// public int getCurrentPartitionIndex() { -// return currentPartitionIndex; -// } -// -// public void setCurrentPartitionIndex(int currentPartitionIndex) { -// this.currentPartitionIndex = currentPartitionIndex; -// } -// -// public float getAverageRequestsInFlight() { -// return requestsInFlight.getAverage(); -// } -// -// public void setAverageRequestsInFlight(float averageRequestsInFlight) { -// requestsInFlight.setAverage(averageRequestsInFlight); -// averageRifReset = true; -// if(secondDerivativeRifRest && gradientRifReset){ -// rifReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Requests in flights stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public float getRequestsInFlightSecondDerivative() { -// return requestsInFlight.getSecondDerivative(); -// } -// -// public void setRequestsInFlightSecondDerivative(float requestsInFlightSecondDerivative) { -// requestsInFlight.setSecondDerivative(requestsInFlightSecondDerivative); -// secondDerivativeRifRest = true; -// if(averageRifReset && gradientRifReset){ -// rifReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Requests in flights stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public float getRequestsInFlightGradient() { -// return requestsInFlight.getGradient(); -// } -// -// public void setRequestsInFlightGradient(float requestsInFlightGradient) { -// requestsInFlight.setGradient(requestsInFlightGradient); -// gradientRifReset = true; -// if(secondDerivativeRifRest && averageRifReset){ -// rifReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Requests in flights stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public boolean isRifReset() { -// return rifReset; -// } -// -// public void setRifReset(boolean rifReset) { -// this.rifReset = rifReset; -// this.averageRifReset = rifReset; -// this.gradientRifReset = rifReset; -// this.secondDerivativeRifRest = rifReset; -// } -// -// -// public float getAverageMemoryConsumption() { -// return memoryConsumption.getAverage(); -// } -// -// public void setAverageMemoryConsumption(float averageMemoryConsumption) { -// memoryConsumption.setAverage(averageMemoryConsumption); -// averageMemoryConsumptionReset = true; -// if(secondDerivativeMemoryConsumptionRest && gradientMemoryConsumptionReset){ -// memoryConsumptionReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Memory consumption stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public float getMemoryConsumptionSecondDerivative() { -// return memoryConsumption.getSecondDerivative(); -// } -// -// public void setMemoryConsumptionSecondDerivative(float memoryConsumptionSecondDerivative) { -// memoryConsumption.setSecondDerivative(memoryConsumptionSecondDerivative); -// secondDerivativeMemoryConsumptionRest = true; -// if(averageMemoryConsumptionReset && gradientMemoryConsumptionReset){ -// memoryConsumptionReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Memory consumption stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public float getMemoryConsumptionGradient() { -// return memoryConsumption.getGradient(); -// } -// -// public void setMemoryConsumptionGradient(float memoryConsumptionGradient) { -// memoryConsumption.setGradient(memoryConsumptionGradient); -// gradientMemoryConsumptionReset = true; -// if(secondDerivativeMemoryConsumptionRest && averageMemoryConsumptionReset){ -// memoryConsumptionReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Memory consumption stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public boolean isMemoryConsumptionReset() { -// return memoryConsumptionReset; -// } -// -// public void setMemoryConsumptionReset(boolean memoryConsumptionReset) { -// this.memoryConsumptionReset = memoryConsumptionReset; -// this.averageMemoryConsumptionReset = memoryConsumptionReset; -// this.gradientMemoryConsumptionReset = memoryConsumptionReset; -// this.secondDerivativeMemoryConsumptionRest = memoryConsumptionReset; -// } -// -// -// public float getAverageLoadAverage() { -// return loadAverage.getAverage(); -// } -// -// public void setAverageLoadAverage(float averageLoadAverage) { -// loadAverage.setAverage(averageLoadAverage); -// averageLoadAverageReset = true; -// if(secondDerivativeLoadAverageRest && gradientLoadAverageReset){ -// loadAverageReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Load average stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public float getLoadAverageSecondDerivative() { -// return loadAverage.getSecondDerivative(); -// } -// -// public void setLoadAverageSecondDerivative(float loadAverageSecondDerivative) { -// loadAverage.setSecondDerivative(loadAverageSecondDerivative); -// secondDerivativeLoadAverageRest = true; -// if(averageLoadAverageReset && gradientLoadAverageReset){ -// loadAverageReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Load average stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public float getLoadAverageGradient() { -// return loadAverage.getGradient(); -// } -// -// public void setLoadAverageGradient(float loadAverageGradient) { -// loadAverage.setGradient(loadAverageGradient); -// gradientLoadAverageReset = true; -// if(secondDerivativeLoadAverageRest && averageLoadAverageReset){ -// loadAverageReset = true; -// if(log.isDebugEnabled()){ -// log.debug(String.format("Load average stats are reset, ready to do scale check [network partition] %s" -// , this.networkPartitionId)); -// } -// } -// } -// -// public boolean isLoadAverageReset() { -// return loadAverageReset; -// } -// -// public void setLoadAverageReset(boolean loadAverageReset) { -// this.loadAverageReset = loadAverageReset; -// this.averageLoadAverageReset = loadAverageReset; -// this.gradientLoadAverageReset = loadAverageReset; -// this.secondDerivativeLoadAverageRest = loadAverageReset; -// } - - - @Override public String toString() { return "NetworkPartitionLbHolder [networkPartitionId=" @@ -438,86 +231,4 @@ public class NetworkPartitionLbHolder implements Serializable{ return networkPartitionId; } -// public void increaseMemberCountOfPartition(String partitionId, int count){ -// if(!partitionCountExists(partitionId)){ -// addPartitionCount(partitionId, 1); -// } else{ -// partitionToMemberCountMap.put(partitionId, getMemberCountOfPartition(partitionId) + count); -// } -// } - -// public void decreaseMemberCountOfPartition(String partitionId, int count){ -// -// partitionToMemberCountMap.put(partitionId, getMemberCountOfPartition(partitionId) - count); -// } -// -// public void addPartitionCount(String partitionId, int count){ -// partitionToMemberCountMap.put(partitionId, count); -// } -// -// public void removePartitionCount(String partitionId){ -// -// partitionToMemberCountMap.remove(partitionId); -// } - -// public boolean partitionCountExists(String partitionId){ -// return partitionToMemberCountMap.containsKey(partitionId); -// } - -// public int getMemberCountOfPartition(String partitionId){ -// if(partitionToMemberCountMap.containsKey(partitionId)) { -// return partitionToMemberCountMap.get(partitionId); -// } -// return 0; -// if(partitionCtxts.containsKey(partitionId)){ -// return getPartitionCtxt(partitionId).getTotalMemberCount(); -// } -// return 0; -// } -// -// public Map<String, PartitionContext> getPartitionCtxts() { -// return partitionCtxts; -// } -// -// public PartitionContext getPartitionCtxt(String partitionId) { -// return partitionCtxts.get(partitionId); -// } -// -// public void addPartitionContext(PartitionContext partitionContext) { -// partitionCtxts.put(partitionContext.getPartitionId(), partitionContext); -// } -// -// public String getPartitionAlgorithm() { -// return partitionAlgorithm; -// } -// -// public Partition[] getPartitions() { -// return partitions; -// } -// -// public int getNonTerminatedMemberCountOfPartition(String partitionId) { -// if(partitionCtxts.containsKey(partitionId)){ -// return getPartitionCtxt(partitionId).getNonTerminatedMemberCount(); -// } -// return 0; -// } -// -// public int getActiveMemberCount(String currentPartitionId) { -// if(partitionCtxts.containsKey(currentPartitionId)){ -// return getPartitionCtxt(currentPartitionId).getActiveMemberCount(); -// } -// return 0; -// } - -// public void setPartitions(Partition[] partitions) { -// this.partitions = partitions; -// for (Partition partition: partitions){ -// partitionToMemberCountMap.put(partition.getNetworkPartitionId(), 0); -// } -// } - -// public void setPartitionToMemberCountMap(Map<String, Integer> partitionToMemberCountMap) { -// this.partitionToMemberCountMap = partitionToMemberCountMap; -// } - } \ No newline at end of file
