forcing libaio option

This commit is contained in:
Clebert Suconic 2015-08-12 14:46:46 -04:00
parent f369142e28
commit 800cc461ca
2 changed files with 12 additions and 1 deletions

View File

@ -157,6 +157,9 @@ public class Create extends InputAbstract {
@Option(name = "--topics", description = "comma separated list of jms 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_CYGWIN;
@ -665,7 +668,11 @@ public class Create extends InputAbstract {
}
private boolean supportsLibaio() {
if (LibaioContext.isLoaded()) {
if (forceLibaio) {
// forcing libaio
return true;
}
else if (LibaioContext.isLoaded()) {
try (LibaioContext context = new LibaioContext(1, true)) {
File tmpFile = new File(directory, "validateAIO.bin");
boolean supportsLibaio = true;

View File

@ -251,6 +251,10 @@ public class ArtemisCreatePlugin extends ArtemisAbstractPlugin {
add(listCommands, "--verbose");
if ("Linux".equals(System.getProperty("os.name"))) {
add(listCommands, "--aio");
}
for (String str : args) {
add(listCommands, str);
}