24
24
import java .text .DecimalFormat ;
25
25
import java .util .HashMap ;
26
26
import java .util .LinkedHashMap ;
27
+ import java .util .Map ;
27
28
28
29
import org .apache .activemq .artemis .api .config .ActiveMQDefaultConfiguration ;
29
30
import org .apache .activemq .artemis .api .core .RoutingType ;
@@ -557,7 +558,7 @@ public Object run(ActionContext context) throws Exception {
557
558
558
559
context .out .println (String .format ("Creating ActiveMQ Artemis instance at: %s" , directory .getCanonicalPath ()));
559
560
560
- HashMap <String , String > filters = new LinkedHashMap <>();
561
+ Map <String , String > filters = new LinkedHashMap <>();
561
562
562
563
if (journalDeviceBlockSize % 512 != 0 ) {
563
564
// This will generate a CLI error
@@ -880,7 +881,7 @@ public Object run(ActionContext context) throws Exception {
880
881
return null ;
881
882
}
882
883
883
- protected static void addScriptFilters (HashMap <String , String > filters ,
884
+ protected static void addScriptFilters (Map <String , String > filters ,
884
885
File home ,
885
886
File directory ,
886
887
File etcFolder ,
@@ -910,7 +911,7 @@ protected static void addScriptFilters(HashMap<String, String> filters,
910
911
filters .put ("${role}" , role );
911
912
}
912
913
913
- private String getConnectors (HashMap <String , String > filters ) throws IOException {
914
+ private String getConnectors (Map <String , String > filters ) throws IOException {
914
915
if (staticNode != null ) {
915
916
StringWriter stringWriter = new StringWriter ();
916
917
PrintWriter printer = new PrintWriter (stringWriter );
@@ -987,7 +988,7 @@ private static int countBoolean(boolean...b) {
987
988
/**
988
989
* It will create the address and queue configurations
989
990
*/
990
- private void applyAddressesAndQueues (HashMap <String , String > filters ) {
991
+ private void applyAddressesAndQueues (Map <String , String > filters ) {
991
992
StringWriter writer = new StringWriter ();
992
993
PrintWriter printWriter = new PrintWriter (writer );
993
994
printWriter .println ();
@@ -1027,7 +1028,7 @@ private void applyAddressesAndQueues(HashMap<String, String> filters) {
1027
1028
filters .put ("${address-queue.settings}" , writer .toString ());
1028
1029
}
1029
1030
1030
- private void performAutoTune (HashMap <String , String > filters , JournalType journalType , File dataFolder ) {
1031
+ private void performAutoTune (Map <String , String > filters , JournalType journalType , File dataFolder ) {
1031
1032
if (noAutoTune ) {
1032
1033
filters .put ("${journal-buffer.settings}" , "" );
1033
1034
filters .put ("${page-sync.settings}" , "" );
@@ -1038,7 +1039,7 @@ private void performAutoTune(HashMap<String, String> filters, JournalType journa
1038
1039
getActionContext ().out .println ("Auto tuning journal ..." );
1039
1040
1040
1041
if (mapped && noJournalSync ) {
1041
- HashMap <String , String > syncFilter = new HashMap <>();
1042
+ Map <String , String > syncFilter = new HashMap <>();
1042
1043
syncFilter .put ("${nanoseconds}" , "0" );
1043
1044
syncFilter .put ("${writesPerMillisecond}" , "0" );
1044
1045
syncFilter .put ("${maxaio}" , journalType == JournalType .ASYNCIO ? "" + ActiveMQDefaultConfiguration .getDefaultJournalMaxIoAio () : "1" );
@@ -1055,7 +1056,7 @@ private void performAutoTune(HashMap<String, String> filters, JournalType journa
1055
1056
1056
1057
String writesPerMillisecondStr = new DecimalFormat ("###.##" ).format (writesPerMillisecond );
1057
1058
1058
- HashMap <String , String > syncFilter = new HashMap <>();
1059
+ Map <String , String > syncFilter = new HashMap <>();
1059
1060
syncFilter .put ("${nanoseconds}" , Long .toString (nanoseconds ));
1060
1061
syncFilter .put ("${writesPerMillisecond}" , writesPerMillisecondStr );
1061
1062
syncFilter .put ("${maxaio}" , journalType == JournalType .ASYNCIO ? "" + ActiveMQDefaultConfiguration .getDefaultJournalMaxIoAio () : "1" );
@@ -1140,11 +1141,11 @@ private static String path(File value) throws IOException {
1140
1141
return value .getCanonicalPath ();
1141
1142
}
1142
1143
1143
- private void write (String source , HashMap <String , String > filters , boolean unixTarget ) throws Exception {
1144
+ private void write (String source , Map <String , String > filters , boolean unixTarget ) throws Exception {
1144
1145
write (source , new File (directory , source ), filters , unixTarget , force );
1145
1146
}
1146
1147
1147
- private void writeEtc (String source , File etcFolder , HashMap <String , String > filters , boolean unixTarget ) throws Exception {
1148
+ private void writeEtc (String source , File etcFolder , Map <String , String > filters , boolean unixTarget ) throws Exception {
1148
1149
write ("etc/" + source , new File (etcFolder , source ), filters , unixTarget , force );
1149
1150
}
1150
1151
0 commit comments