mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-25 06:58:39 +00:00
bug5627: made all fields of AwsShardImpl final and initialize all in constructor
This commit is contained in:
@@ -124,7 +124,7 @@
|
|||||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="com.sap.sailing.gwt.ui"/>
|
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="com.sap.sailing.gwt.ui"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-style PRETTY -incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9876 -startupUrl /gwt/Home.html -startupUrl /gwt/AdminConsole.html -startupUrl /gwt/PairingList.html -startupUrl /gwt/LeaderboardEditing.html -startupUrl /gwt/Leaderboard.html -startupUrl /gwt/Spectator.html -startupUrl /gwt/EmbeddedMapAndWindChart -startupUrl /gwt/RaceBoard.html -startupUrl /gwt/RegattaOverview.html -startupUrl /gwt/DataMining.html -startupUrl /gwt/Simulator.html -startupUrl /gwt/VideoPopup.html -startupUrl /gwt/AutoPlay.html -startupUrl /gwt/YoutubePopup.html com.sap.sailing.gwt.home.Home com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.PairingList com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.EmbeddedMapAndWindChart com.sap.sailing.gwt.ui.RaceBoard com.sap.sailing.gwt.regattaoverview.RegattaOverview com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.autoplay.AutoPlay"/>
|
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -style PRETTY -incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9876 -startupUrl /gwt/Home.html -startupUrl /gwt/AdminConsole.html -startupUrl /gwt/PairingList.html -startupUrl /gwt/LeaderboardEditing.html -startupUrl /gwt/Leaderboard.html -startupUrl /gwt/Spectator.html -startupUrl /gwt/EmbeddedMapAndWindChart -startupUrl /gwt/RaceBoard.html -startupUrl /gwt/RegattaOverview.html -startupUrl /gwt/DataMining.html -startupUrl /gwt/Simulator.html -startupUrl /gwt/VideoPopup.html -startupUrl /gwt/AutoPlay.html -startupUrl /gwt/YoutubePopup.html com.sap.sailing.gwt.home.Home com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.PairingList com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.EmbeddedMapAndWindChart com.sap.sailing.gwt.ui.RaceBoard com.sap.sailing.gwt.regattaoverview.RegattaOverview com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.ui.Simulator com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.autoplay.AutoPlay"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+UseG1GC -XX:-UseStringDeduplication -Dgwt.watchFileChanges=false -Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false -Xmx4096m"/>
|
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-XX:+UseG1GC -XX:-UseStringDeduplication -Dgwt.watchFileChanges=false -Xmx2048m -Dgwt-usearchives=false -Dgwt.persistentunitcache=false -Xmx4096m"/>
|
||||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.sap.sailing.gwt.ui}/.tmp/gwt-work"/>
|
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.sap.sailing.gwt.ui}/.tmp/gwt-work"/>
|
||||||
|
|||||||
+2
-3
@@ -352,10 +352,9 @@ implements AwsApplicationReplicaSet<ShardingKey, MetricsT, ProcessT> {
|
|||||||
}
|
}
|
||||||
AwsShardImpl<ShardingKey> shard = new AwsShardImpl<ShardingKey>(getName(),
|
AwsShardImpl<ShardingKey> shard = new AwsShardImpl<ShardingKey>(getName(),
|
||||||
Util.asList(Util.map(keys, s -> (ShardingKey) s)), e.getKey(), shardName,
|
Util.asList(Util.map(keys, s -> (ShardingKey) s)), e.getKey(), shardName,
|
||||||
e.getKey().getLoadBalancer(), pathRules);
|
e.getKey().getLoadBalancer(), pathRules,
|
||||||
shardMap.put(shard, shard.getKeys());
|
|
||||||
shard.setAutoscalingGroup(
|
|
||||||
getShardAutoscalinggroup(e.getKey(), autoScalingGroups, launchConfigurations));
|
getShardAutoscalinggroup(e.getKey(), autoScalingGroups, launchConfigurations));
|
||||||
|
shardMap.put(shard, shard.getKeys());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-21
@@ -11,30 +11,26 @@ import software.amazon.awssdk.services.elasticloadbalancingv2.model.Rule;
|
|||||||
public class AwsShardImpl<ShardingKey> implements AwsShard<ShardingKey> {
|
public class AwsShardImpl<ShardingKey> implements AwsShard<ShardingKey> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
final private Iterable<ShardingKey> keys;
|
private final Iterable<ShardingKey> keys;
|
||||||
final private TargetGroup<ShardingKey> targetGroup;
|
private final TargetGroup<ShardingKey> targetGroup;
|
||||||
final private String shardName;
|
private final String shardName;
|
||||||
final private String name;
|
private final String name;
|
||||||
private AwsAutoScalingGroup autoScalingGroup;
|
private final AwsAutoScalingGroup autoScalingGroup;
|
||||||
private ShardName shardNameDTO;
|
private final ShardName shardNameDTO;
|
||||||
private ApplicationLoadBalancer<ShardingKey> loadBalancer;
|
private final ApplicationLoadBalancer<ShardingKey> loadBalancer;
|
||||||
private Iterable<Rule> rules;
|
private final Iterable<Rule> rules;
|
||||||
|
|
||||||
public AwsShardImpl(String shardname, Iterable<ShardingKey> keys, TargetGroup<ShardingKey> targetgroup,
|
public AwsShardImpl(String shardname, Iterable<ShardingKey> keys, TargetGroup<ShardingKey> targetgroup,
|
||||||
ShardName shardnameDTO, ApplicationLoadBalancer<ShardingKey> loadbalancer, Iterable<Rule> rules) {
|
ShardName shardnameDTO, ApplicationLoadBalancer<ShardingKey> loadbalancer, Iterable<Rule> rules,
|
||||||
|
AwsAutoScalingGroup asg) {
|
||||||
this.keys = keys;
|
this.keys = keys;
|
||||||
this.targetGroup = targetgroup;
|
this.targetGroup = targetgroup;
|
||||||
this.shardName = shardname;
|
this.shardName = shardname;
|
||||||
this.setShardNameDTO(shardnameDTO);
|
this.shardNameDTO = shardnameDTO;
|
||||||
this.name = shardnameDTO.getName();
|
this.name = shardnameDTO.getName();
|
||||||
this.loadBalancer = loadbalancer;
|
this.loadBalancer = loadbalancer;
|
||||||
this.rules =rules;
|
this.autoScalingGroup = asg;
|
||||||
}
|
this.rules = rules;
|
||||||
|
|
||||||
public void setAutoscalingGroup(AwsAutoScalingGroup asg) {
|
|
||||||
if (autoScalingGroup == null) {
|
|
||||||
autoScalingGroup = asg;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -66,10 +62,6 @@ public class AwsShardImpl<ShardingKey> implements AwsShard<ShardingKey> {
|
|||||||
return shardNameDTO;
|
return shardNameDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShardNameDTO(ShardName shardNameDTO) {
|
|
||||||
this.shardNameDTO = shardNameDTO;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ApplicationLoadBalancer<ShardingKey> getLoadbalancer() {
|
public ApplicationLoadBalancer<ShardingKey> getLoadbalancer() {
|
||||||
return loadBalancer;
|
return loadBalancer;
|
||||||
|
|||||||
Reference in New Issue
Block a user