Package com.uc4.api.objects
Class HostGroup
- java.lang.Object
-
- com.uc4.api.objects.UC4Object
-
- com.uc4.api.objects.HostGroup
-
public class HostGroup extends UC4Object
Hostgroup object.
-
-
Constructor Summary
Constructors Constructor Description HostGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHost(HostGroupItem item)
Adds a host or filter definition to this HostGroup.void
addHost(HostGroupItem item, int index)
Adds a host or filter definition on the specified position the this HostGroup.Authorizations
authorizations()
Returns the authorization data of this object.void
clear()
Removes all filter and host definitions from this HostGroup.java.lang.String
getCITName()
Returns the CIT Name for the CIT Host Group Type.java.lang.String
getHostGroupType()
Returns the Job type of all hosts in this HostGroup.int
getMaxParallelJobs()
Returns the maximum number of parallel tasks when the execution mode is set to ALL.Header
header()
Returns the header data of this object.java.util.Iterator<HostGroupItem>
hosts()
Returns anjava.util.Iterator
overHostGroupItem
.boolean
isEnforced()
boolean
isExecutable()
Returnstrue
if this Object can be executed.boolean
isExecuteLoadDependent()
boolean
isExecuteOnAllHosts()
boolean
isExecuteOnAnyHost()
boolean
isExecuteOnFirstHost()
boolean
isExecuteOnNextHost()
protected void
loadContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
void
setCITName(java.lang.String citName)
Sets the CIT Name for the CIT Host Group Type.void
setEnforced(boolean enforced)
Sets the enforced flag:void
setExecuteLoadDependent()
Sets the execution mode to LOAD_DEPENDENT.void
setExecuteOnAllHosts()
Sets the execution mode to all hosts.void
setExecuteOnAnyHost()
Sets the execution mode to ANY.void
setExecuteOnFirstHost()
Sets the execution mode to FIRST.void
setExecuteOnNextHost()
Sets the execution mode to NEXT.void
setHostGroupType(java.lang.String hostGroupType)
Sets the Job type for the HostGroup.void
setMaxParallelJobs(int maxParallelJobs)
Sets the maximum number of parallel tasks when the execution mode is set to ALL.int
size()
protected void
storeContent(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement, ConnectionAttributes sessionInfo)
-
Methods inherited from class com.uc4.api.objects.UC4Object
docu, getAccess, getIdnr, getModCount, getName, getObjectClient, getType, isOldVersion, load, store, validate
-
-
-
-
Method Detail
-
loadContent
protected void loadContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
-
storeContent
protected void storeContent(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement, ConnectionAttributes sessionInfo)
-
header
public Header header()
Returns the header data of this object. This is the information of the header tab in the dialog client.- Returns:
- header
-
authorizations
public Authorizations authorizations()
Returns the authorization data of this object. This is the information of the authorization tab in the dialog client. The authorizations can only be read and set in client 0. This method returnsnull
if it's called in a client other than 0.- Returns:
- Authorizations object or null if the object is not in client 0.
-
setHostGroupType
public void setHostGroupType(java.lang.String hostGroupType)
Sets the Job type for the HostGroup. All hosts in a HostGroup must have the same Job type (for example WINDOWS). You can modify the Job type only if there are no hosts in the HostGroup. Valid values forhostGroupType
are all generic host namens without the angle brackets:- BS2000
- GCOS8
- WIN
- MPE
- NSK
- OA
- OS/390
- OS/400
- PS
- SIEBEL
- R3
- UNIX
- VMS
- WIN
- JMX
- SQL
- Parameters:
hostGroupType
- Job type
-
getHostGroupType
public java.lang.String getHostGroupType()
Returns the Job type of all hosts in this HostGroup.- Returns:
- Job type
-
setCITName
public void setCITName(java.lang.String citName)
Sets the CIT Name for the CIT Host Group Type.- Parameters:
citName
- Name of the RA solution
-
getCITName
public java.lang.String getCITName()
Returns the CIT Name for the CIT Host Group Type.- Returns:
- citName
-
isExecuteOnAllHosts
public boolean isExecuteOnAllHosts()
- Returns:
- True if a task will be executed on all hosts of this HostGroup
-
setExecuteOnAllHosts
public void setExecuteOnAllHosts()
Sets the execution mode to all hosts. A task will be executed on all hosts of this HostGroup.
-
isExecuteOnFirstHost
public boolean isExecuteOnFirstHost()
- Returns:
- True if a task will run on the first active host in this HostGroup
-
setExecuteOnFirstHost
public void setExecuteOnFirstHost()
Sets the execution mode to FIRST. A task will run on the first active host in this HostGroup.
-
isExecuteOnNextHost
public boolean isExecuteOnNextHost()
- Returns:
- True if the execution mode is set to NEXT
-
setExecuteOnNextHost
public void setExecuteOnNextHost()
Sets the execution mode to NEXT. Each task which is assinged to this HostGroup will run on another host (Rotation).
-
isExecuteLoadDependent
public boolean isExecuteLoadDependent()
- Returns:
- True if the execution mode is set to LOAD_DEPENDENT
-
setExecuteLoadDependent
public void setExecuteLoadDependent()
Sets the execution mode to LOAD_DEPENDENT. A task will run on the host in this HostGroup which has the lowest number of tasks.
-
isExecuteOnAnyHost
public boolean isExecuteOnAnyHost()
- Returns:
- Returns true if the task should execute on any host
-
setExecuteOnAnyHost
public void setExecuteOnAnyHost()
Sets the execution mode to ANY. The task will run on a random host.
-
isEnforced
public boolean isEnforced()
- Returns:
- True if the execution on all hosts is enforced
-
setEnforced
public void setEnforced(boolean enforced)
Sets the enforced flag:If a task should be executed on all hosts in this HostGroup and the enforced flag is set the task will wait for the host.
- Parameters:
enforced
- Enforced
-
getMaxParallelJobs
public int getMaxParallelJobs()
Returns the maximum number of parallel tasks when the execution mode is set to ALL.- Returns:
- Parallel tasks
-
setMaxParallelJobs
public void setMaxParallelJobs(int maxParallelJobs)
Sets the maximum number of parallel tasks when the execution mode is set to ALL.- Parameters:
maxParallelJobs
- Paralell Jobs
-
size
public int size()
- Returns:
- Returns the number of host and filter definitions in this HostGroup
-
addHost
public void addHost(HostGroupItem item)
Adds a host or filter definition to this HostGroup. The item is added at the end of the list.- Parameters:
item
- Filter or Host definition
-
addHost
public void addHost(HostGroupItem item, int index)
Adds a host or filter definition on the specified position the this HostGroup.- Parameters:
item
- Filter or Host definitionindex
- Position
-
clear
public void clear()
Removes all filter and host definitions from this HostGroup.
-
hosts
public java.util.Iterator<HostGroupItem> hosts()
Returns anjava.util.Iterator
overHostGroupItem
. This iterator can also be used to remove items using theIterator.remove
method.- Returns:
- Iterator
-
isExecutable
public boolean isExecutable()
Description copied from class:UC4Object
Returnstrue
if this Object can be executed.- Specified by:
isExecutable
in classUC4Object
- Returns:
- true if the Object can be executed, false if not.
-
-