Class HostGroup

java.lang.Object
com.uc4.api.objects.UC4Object
com.uc4.api.objects.HostGroup

public class HostGroup extends UC4Object
Hostgroup object.
  • Constructor Details

    • HostGroup

      public HostGroup()
  • Method Details

    • loadContent

      protected void loadContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
    • storeContent

      protected void storeContent(com.uc4.util.XMLDocument doc, 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 returns null 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(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 for hostGroupType 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 String getHostGroupType()
      Returns the Job type of all hosts in this HostGroup.
      Returns:
      Job type
    • setCITName

      public void setCITName(String citName)
      Sets the CIT Name for the CIT Host Group Type.
      Parameters:
      citName - Name of the RA solution
    • getCITName

      public 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 definition
      index - Position
    • clear

      public void clear()
      Removes all filter and host definitions from this HostGroup.
    • hosts

      public Iterator<HostGroupItem> hosts()
      Returns an java.util.Iterator over HostGroupItem. This iterator can also be used to remove items using the Iterator.remove method.
      Returns:
      Iterator
    • isExecutable

      public boolean isExecutable()
      Description copied from class: UC4Object
      Returns true if this Object can be executed.
      Specified by:
      isExecutable in class UC4Object
      Returns:
      true if the Object can be executed, false if not.