public final class XenonFactory
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
private |
XenonFactory()
Constructor of XenonFactory should never be used.
|
Modifier and Type | Method and Description |
---|---|
static void |
endAll()
End all Xenon instances created by this factory.
|
static void |
endXenon(Xenon xenon)
Ends a Xenon instance.
|
static Xenon |
newXenon(java.util.Map<java.lang.String,java.lang.String> properties)
Create a new Xenon instance using the given properties.
|
private XenonFactory()
public static Xenon newXenon(java.util.Map<java.lang.String,java.lang.String> properties) throws XenonException
XenonException
will be
thrown if properties
contains any unknown keys. Also, make
sure to always end Xenon instances by calling endXenon() when you no
longer need them, otherwise their associated resources remain allocated.properties
- (optional) properties used to configure the newly created Xenon instance.UnknownPropertyException
- If an unknown property was passed.InvalidPropertyException
- If a known property was passed with an illegal value.XenonException
- If the Xenon failed initialize.public static void endXenon(Xenon xenon) throws XenonException
Schedulers
, FileSystems
and Credentials
.
In addition, all non online Jobs
it has created will be killed
(for example jobs that run locally).xenon
- the Xenon to end.NoSuchXenonException
- If the Xenon was not foundXenonException
- If the Xenon failed to end.public static void endAll()