|
@@ -1,5 +1,8 @@
|
|
|
package uk.ac.ic.wlgitbridge.bridge.swap.job;
|
|
package uk.ac.ic.wlgitbridge.bridge.swap.job;
|
|
|
|
|
|
|
|
|
|
+import uk.ac.ic.wlgitbridge.util.Log;
|
|
|
|
|
+import uk.ac.ic.wlgitbridge.bridge.swap.job.SwapJob.CompressionMethod;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* Created by winston on 23/08/2016.
|
|
* Created by winston on 23/08/2016.
|
|
|
*/
|
|
*/
|
|
@@ -9,17 +12,20 @@ public class SwapJobConfig {
|
|
|
private final int lowGiB;
|
|
private final int lowGiB;
|
|
|
private final int highGiB;
|
|
private final int highGiB;
|
|
|
private final long intervalMillis;
|
|
private final long intervalMillis;
|
|
|
|
|
+ private final String compressionMethod;
|
|
|
|
|
|
|
|
public SwapJobConfig(
|
|
public SwapJobConfig(
|
|
|
int minProjects,
|
|
int minProjects,
|
|
|
int lowGiB,
|
|
int lowGiB,
|
|
|
int highGiB,
|
|
int highGiB,
|
|
|
- long intervalMillis
|
|
|
|
|
|
|
+ long intervalMillis,
|
|
|
|
|
+ String compressionMethod
|
|
|
) {
|
|
) {
|
|
|
this.minProjects = minProjects;
|
|
this.minProjects = minProjects;
|
|
|
this.lowGiB = lowGiB;
|
|
this.lowGiB = lowGiB;
|
|
|
this.highGiB = highGiB;
|
|
this.highGiB = highGiB;
|
|
|
this.intervalMillis = intervalMillis;
|
|
this.intervalMillis = intervalMillis;
|
|
|
|
|
+ this.compressionMethod = compressionMethod;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public int getMinProjects() {
|
|
public int getMinProjects() {
|
|
@@ -38,4 +44,12 @@ public class SwapJobConfig {
|
|
|
return intervalMillis;
|
|
return intervalMillis;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public SwapJob.CompressionMethod getCompressionMethod() {
|
|
|
|
|
+ CompressionMethod result = SwapJob.stringToCompressionMethod(compressionMethod);
|
|
|
|
|
+ if (result == null) {
|
|
|
|
|
+ Log.info("SwapJobConfig: un-supported compressionMethod '{}', default to 'bzip2'", compressionMethod);
|
|
|
|
|
+ result = CompressionMethod.Bzip2;
|
|
|
|
|
+ }
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|