forcing libaio option
This commit is contained in:
parent
f369142e28
commit
800cc461ca
|
@ -157,6 +157,9 @@ public class Create extends InputAbstract {
|
||||||
@Option(name = "--topics", description = "comma separated list of jms topics ")
|
@Option(name = "--topics", description = "comma separated list of jms topics ")
|
||||||
String topics;
|
String topics;
|
||||||
|
|
||||||
|
@Option(name = "--aio", description = "Force aio journal on the configuration regardless of the library being available or not.")
|
||||||
|
boolean forceLibaio;
|
||||||
|
|
||||||
boolean IS_WINDOWS;
|
boolean IS_WINDOWS;
|
||||||
|
|
||||||
boolean IS_CYGWIN;
|
boolean IS_CYGWIN;
|
||||||
|
@ -665,7 +668,11 @@ public class Create extends InputAbstract {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean supportsLibaio() {
|
private boolean supportsLibaio() {
|
||||||
if (LibaioContext.isLoaded()) {
|
if (forceLibaio) {
|
||||||
|
// forcing libaio
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (LibaioContext.isLoaded()) {
|
||||||
try (LibaioContext context = new LibaioContext(1, true)) {
|
try (LibaioContext context = new LibaioContext(1, true)) {
|
||||||
File tmpFile = new File(directory, "validateAIO.bin");
|
File tmpFile = new File(directory, "validateAIO.bin");
|
||||||
boolean supportsLibaio = true;
|
boolean supportsLibaio = true;
|
||||||
|
|
|
@ -251,6 +251,10 @@ public class ArtemisCreatePlugin extends ArtemisAbstractPlugin {
|
||||||
|
|
||||||
add(listCommands, "--verbose");
|
add(listCommands, "--verbose");
|
||||||
|
|
||||||
|
if ("Linux".equals(System.getProperty("os.name"))) {
|
||||||
|
add(listCommands, "--aio");
|
||||||
|
}
|
||||||
|
|
||||||
for (String str : args) {
|
for (String str : args) {
|
||||||
add(listCommands, str);
|
add(listCommands, str);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue