public class GEObjectEditor
extends java.lang.Object
ClusterQueue geObj = new ClusterQueue(true);
GEObjectEditor.updateObjectWithText(jgdi, geObj, "name test\n acl user1 user2\n xacl user3");
or
GEObjectEditor.updateObjectWithText(geObj, "name test\n acl user1 user2\n xacl user3");
jgdi.addClusterQueue(geObj);
Only difference between these methods is that whenJGDI reference is passed attributes
are checked if they are known to Grid Engine and their structure is more advaced,
they are retrived.
Such as can have ...
While when not passing JGDI reference, new Objects are created with default values.
This can lead to unexpected behaviour when you try to update already existing object
or even create a new one.
RECOMMENDED IS TO USE updateObjectWithText(JGDI jgdi, GEObject obj, String text)
method.
Modifying existing GEObjects:
ClusterQueue geObj = jgdi.getClusterQueue("test");
GEObjectEditor.updateObjectWithText(jgdi, geObj, "xacl user4");
jgdi.updateClusterQueue(geObj);
Constructor and Description |
---|
GEObjectEditor() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getAllPropertiesAsText(GEObject obj)
Retrives all properties known to JGDI for specified GEObject as text.
|
static java.lang.String |
getConfigurablePropertiesAsText(GEObject obj)
Retrives configurable properties for specified GEObject as text.
|
static java.lang.String |
getPropertiesAsText(GEObject obj,
int propScope) |
static java.lang.String |
getPropertyAsText(GEObject obj,
int propScope,
java.lang.String propName) |
static java.lang.String |
getReadOnlyPropertiesAsText(GEObject obj)
Retrives read-only properties for specified GEObject as text.
|
static void |
main(java.lang.String[] args) |
static <T extends GEObject> |
updateObjectWithText(JGDI jgdi,
T obj,
java.lang.String text)
Updates GEObject based on the text.
|
static <T extends GEObject> |
updateObjectWithText(T obj,
java.lang.String text)
Updates GEObject based on the text.
|
public static <T extends GEObject> T updateObjectWithText(T obj, java.lang.String text)
updateObjectWithText(JGDI jgdi, GEObject obj, String text)
that retrieves these objects from Grid Engine instead.public static <T extends GEObject> T updateObjectWithText(JGDI jgdi, T obj, java.lang.String text)
public static java.lang.String getAllPropertiesAsText(GEObject obj)
public static java.lang.String getConfigurablePropertiesAsText(GEObject obj)
public static java.lang.String getReadOnlyPropertiesAsText(GEObject obj)
public static java.lang.String getPropertiesAsText(GEObject obj, int propScope)
public static java.lang.String getPropertyAsText(GEObject obj, int propScope, java.lang.String propName) throws JGDIException
JGDIException
public static void main(java.lang.String[] args)
Copyright © 2007 Sun Microsystems, Inc. All rights reserved.