"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dso-l2/src/main/java/com/tc/l2/ha/TopologyWeightGenerator.java" between
terracotta-core-5.7.0.tar.gz and terracotta-core-5.7.1.tar.gz

About: Terracotta - Clustering technology for Java ("Network Attached Memory", "Distributed Cache"). Source code of the server (5.x) core components.

TopologyWeightGenerator.java  (terracotta-core-5.7.0):TopologyWeightGenerator.java  (terracotta-core-5.7.1)
skipping to change at line 27 skipping to change at line 27
* *
*/ */
package com.tc.l2.ha; package com.tc.l2.ha;
import com.tc.l2.ha.WeightGeneratorFactory.WeightGenerator; import com.tc.l2.ha.WeightGeneratorFactory.WeightGenerator;
import org.terracotta.configuration.Configuration; import org.terracotta.configuration.Configuration;
public class TopologyWeightGenerator implements WeightGenerator { public class TopologyWeightGenerator implements WeightGenerator {
private final Configuration configuration; private final Configuration configuration;
private final int initialSize;
public TopologyWeightGenerator(Configuration config) { public TopologyWeightGenerator(Configuration config) {
this.configuration = config; this.configuration = config;
this.initialSize = config.getServerConfigurations().size();
} }
@Override @Override
public long getWeight() { public long getWeight() {
return configuration.getServerConfigurations().size(); try {
return configuration.getServerConfigurations().size();
} catch (Throwable t) {
return initialSize;
}
} }
} }
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)