Class JobIdentifier

java.lang.Object
net.sf.basedb.opengrid.JobIdentifier

public class JobIdentifier
extends Object
Represents an identifier for a job on an Open Grid Scheduler cluster. The cluster id and job id is required while the BASE job id is optional.
Since:
1.0
Author:
nicklas
  • Field Details

    • clusterId

      private final String clusterId
    • clusterJobId

      private final String clusterJobId
    • baseJobId

      private final int baseJobId
  • Constructor Details

    • JobIdentifier

      public JobIdentifier​(String clusterId, String clusterJobId, int baseJobId)
      Creates a job identifier for a job on a cluster that has a known job in BASE.
    • JobIdentifier

      public JobIdentifier​(String clusterId, String clusterJobId)
      Creates a job identifier for a job on a cluster that has no known job in BASE.
    • JobIdentifier

      public JobIdentifier​(String clusterId, String clusterJobId, Job baseJob)
      Creates a job identifier for a job on a cluster that has a known job in BASE.
  • Method Details

    • getClusterId

      public String getClusterId()
      Get the ID of the cluster the job is located on.
    • getClusterJobId

      public String getClusterJobId()
      Get the (Open Grid Schedulre) ID of the job.
    • getBaseJobId

      public int getBaseJobId()
      Get the corresponding job id in BASE.
    • equals

      public boolean equals​(Object other)
      Equality is based on the cluster id and job id only. BASE internal id is ignored.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object