public class CondorVersion extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
CondorVersion.CondorVersionCallback
An inner class, that implements the StreamGobblerCallback to determine
the version of Condor being used.
|
Modifier and Type | Field and Description |
---|---|
static String |
CONDOR_VERSION_COMMAND
The condor version command to be executed.
|
private static int |
MAX_NUMBER_OF_VERSION_COMPONENTS
The maximum number of components version can have.
|
private static int |
MAX_VERSION_PRECISION
The maximum number of digits each component of version can have.
|
private LogManager |
mLogger
The default logger.
|
private static Pattern |
mPattern
Stores compiled patterns at first use, quasi-Singleton.
|
private static String |
mRegexExpression
Store the regular expressions necessary to parse the output of
condor_version.
|
static long |
v_7_1_0
Predefined Constant for condor version 7.1.0
|
static long |
v_7_1_2
Predefined Constant for condor version 7.1.2
|
static long |
v_7_1_3
Predefined Constant for condor version 7.1.3
|
Modifier | Constructor and Description |
---|---|
private |
CondorVersion(LogManager logger)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
static CondorVersion |
getInstance()
Factory method to instantiate the class.
|
static CondorVersion |
getInstance(LogManager logger)
Factory method to instantiate the class.
|
static int |
intValue(String version)
Deprecated.
|
static void |
main(String[] args)
The main program to test.
|
long |
numericValue()
Returns the condor version parsed by executing the condor_version
command.
|
static long |
numericValue(String version)
Converts a string into the corresponding numeric value.
|
String |
version()
Returns the condor version parsed by executing the condor_version
command.
|
public static final long v_7_1_0
public static final long v_7_1_2
public static final long v_7_1_3
private static final int MAX_NUMBER_OF_VERSION_COMPONENTS
private static final int MAX_VERSION_PRECISION
public static final String CONDOR_VERSION_COMMAND
private static final String mRegexExpression
private static Pattern mPattern
private LogManager mLogger
private CondorVersion(LogManager logger)
logger
- the logger objectpublic static int intValue(String version)
version
- public static long numericValue(String version)
version
- in form of major.minor.patch. You can opt to omit the
minor and patch versions if you wantpublic static CondorVersion getInstance()
public static CondorVersion getInstance(LogManager logger)
logger
- the logger objectpublic long numericValue()
public String version()
public static void main(String[] args)
args
-