extensions/net.sf.basedb.opengrid/trunk/src/net/sf/basedb/opengrid/service/JobStatusUpdater.java

Code
Comments
Other
Rev Date Author Line
4284 21 Dec 16 nicklas 1 package net.sf.basedb.opengrid.service;
4284 21 Dec 16 nicklas 2
4284 21 Dec 16 nicklas 3 import net.sf.basedb.opengrid.JobIdentifier;
4284 21 Dec 16 nicklas 4 import net.sf.basedb.opengrid.JobStatus;
4284 21 Dec 16 nicklas 5 import net.sf.basedb.opengrid.OpenGridSession;
4284 21 Dec 16 nicklas 6
4284 21 Dec 16 nicklas 7 /**
4309 17 Jan 17 nicklas 8   Defines an interface for hooking non-grid jobs into the async feature
4284 21 Dec 16 nicklas 9   of status updates made by {@link OpenGridService}. Implementors may register 
4284 21 Dec 16 nicklas 10   with the {@link OpenGridService#asyncJobStatusUpdate(JobIdentifier, JobStatusUpdater)}
4284 21 Dec 16 nicklas 11   and they will get called during the next job status update.
4284 21 Dec 16 nicklas 12   
4309 17 Jan 17 nicklas 13   If the {@link JobIdentifier} specifies an existing cluster, the implementor will be 
4309 17 Jan 17 nicklas 14   provided with an open SSH session to that cluster. Otherwise the session parameter is
4309 17 Jan 17 nicklas 15   null.  
4309 17 Jan 17 nicklas 16   
4309 17 Jan 17 nicklas 17   All other information that the updater is needing must be taken care of externally. 
4309 17 Jan 17 nicklas 18   If the job identifier also identifies a BASE job and a status update is returned that 
4309 17 Jan 17 nicklas 19   service will make sure that the job is updates and that the {@link JobCompletionHandler}
4284 21 Dec 16 nicklas 20   extension is invoked.
4284 21 Dec 16 nicklas 21
4284 21 Dec 16 nicklas 22   @author nicklas
4284 21 Dec 16 nicklas 23   @since 1.0
4284 21 Dec 16 nicklas 24 */
4284 21 Dec 16 nicklas 25 public interface JobStatusUpdater 
4284 21 Dec 16 nicklas 26 {
4284 21 Dec 16 nicklas 27   /**
4284 21 Dec 16 nicklas 28     A request for status information about the identified job.
4309 17 Jan 17 nicklas 29
4309 17 Jan 17 nicklas 30     @param session A connected session to an Open Grid Cluster (or null if the jobId doesn't specify a cluster)
4309 17 Jan 17 nicklas 31     @param jobId An identifier for the job
4284 21 Dec 16 nicklas 32   */
4284 21 Dec 16 nicklas 33   public JobStatus getJobStatus(OpenGridSession session, JobIdentifier jobId);
4284 21 Dec 16 nicklas 34   
4284 21 Dec 16 nicklas 35 }