Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2012 International Business Machines Corp.
   * 
   * See the NOTICE file distributed with this work for additional information
   * regarding copyright ownership. Licensed under the Apache License, 
   * Version 2.0 (the "License"); you may not use this file except in compliance
   * with the License. You may obtain a copy of the License at
   * 
   *   http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
 */
 package com.ibm.jbatch.container.services;
 
 import java.util.List;
 
 
 
 public interface IJobStatusManagerService extends IBatchServiceBase {

This method creates an entry for a new job instance
 
 	public JobStatus createJobStatus(long jobInstanceIdthrows BatchContainerServiceException;
 
 	public void updateJobStatus(JobStatus jobStatus);

Returns the JobStatus for a given jobInstance id

 
     public abstract JobStatus getJobStatus(long jobInstanceIdthrows BatchContainerServiceException;
     
     public abstract JobStatus getJobStatusFromExecutionId(long executionIdthrows BatchContainerServiceException;
 
     public void updateJobBatchStatus(long jobInstanceIdBatchStatus batchStatusthrows BatchContainerServiceException;
     public void updateJobExecutionStatus(long jobInstanceIdBatchStatus batchStatusString exitStatusthrows BatchContainerServiceException;
     public void updateJobStatusFromJSLStop(long jobInstanceIdString restartOnthrows BatchContainerServiceException;
     public void updateJobStatusWithNewExecution(long jobInstanceIdlong newExecutionIdthrows BatchContainerServiceException;

    
Updates the current step of the job, updates the stepstatus to be IN SETUP and sends the update to the scheduler

 
     public abstract void updateJobCurrentStep(long jobInstanceIdString currentStepName)  throws BatchContainerServiceException;

    
Creates an entry for the step in the stepstatus table during jobsetup

 
     public abstract StepStatus createStepStatus(long stepExecutionIdthrows BatchContainerServiceException;
     
     public abstract void updateStepStatus(long stepExecutionIdStepStatus newStepStatusthrows BatchContainerServiceException;
    
    
Returns a list of all jobstatus currently in the DB

 
     public abstract List<JobStatusgetAllJobStatus() throws BatchContainerServiceException;
    
    
Gets the status for the given step belonging to the current job

 
     public abstract StepStatus getStepStatus(long jobInstanceIdString stepIdthrows BatchContainerServiceException ;
 
 
 	//------------------------------------------------------------------------------	
 
    
Returns the current job status

Returns:
Throws:
BatchContainerServiceException
  
     // No concept of "current" yet.
     // public abstract JobStatus getJobStatus() throws BatchContainerServiceException;
 
    



Updates all columns of the JobStatus row in the DB with the values in the passed object and optionally send the update to the Scheduler and other listeners.

Parameters:
ljsu
Throws:
BatchContainerServiceException
//	public abstract void updateJobStatus(
	//		JobStatus ljsu,boolean notifyListeners) throws BatchContainerServiceException;
Updates all columns of the JobStatus row in the DB with the values in the passed object and sends the update to the Scheduler

Parameters:
ljsu
Throws:
BatchContainerServiceException
	//public abstract void updateJobStatus(
		//	JobStatus ljsu) throws BatchContainerServiceException;
Updates the job status to be suspended and updates the suspend until to the given time. Sets the return code to denote that its suspended and sends an update to the scheduler

Parameters:
suspendUntilTime
status
Throws:
BatchContainerServiceException
	//public abstract void updateJobSuspendUntil( String suspendUntilTime, int status)  throws BatchContainerServiceException;
Deletes the job status entry from the DB

Throws:
BatchContainerServiceException
	//public abstract void deleteJobStatus( ) throws BatchContainerServiceException;
Deletes the status for the specified job

Parameters:
jobId
Throws:
BatchContainerServiceException
	//public abstract void  deleteJobStatus( String jobId, String bjeeName) throws BatchContainerServiceException;
Update the entire stepstatus row in the DB with the given object, updates the current step related attributes of the cached job status with the given object and finally sends an update to the scheduler

Parameters:
st
Throws:
BatchContainerServiceException
	//public abstract void updateStepStatus(StepStatus st) throws BatchContainerServiceException;
Delete all step status entries for the current job

Throws:
BatchContainerServiceException
	//public abstract void deleteStepStatus() throws BatchContainerServiceException;
Updates the resultcode of the current job and sends an update to the scheduler

Parameters:
resultCode
Throws:
BatchContainerServiceException
	//public abstract void updateJobResults( int resultCode) throws BatchContainerServiceException;
Updates the current step return code of the cached job status Updates the step table with the return code send the job status to the scheduler

Parameters:
name
rc
status
Throws:
BatchContainerServiceException
//	public abstract void updateJobStepReturnCode( String name, int rc, int status) throws BatchContainerServiceException;
Updates the stepdata of the current job and sends an update to the scheduler

Parameters:
stepData
Throws:
BatchContainerServiceException
	//public abstract void updateStepData( byte[] stepData) throws BatchContainerServiceException;
Updates the context data of the current job and sends an update to the scheduler

Parameters:
stepData
stepRetries
stepTime
recordMetrics
Throws:
BatchContainerServiceException
	//public abstract void updateContextData( byte[] stepData, long stepRetries, long stepTime, byte[] recordMetrics) throws BatchContainerServiceException;
Returns the jobstatus for the given job ids

Parameters:
jobIdList
Returns:
Throws:
BatchContainerServiceException
	//public abstract List<JobStatus> getJobStatus(List<String> jobIdList) throws BatchContainerServiceException;
Returns the jobstatus list of jobs with the given id across all endpoints

Parameters:
jobId
Returns:
Throws:
BatchContainerServiceException
//	public abstract List<JobStatus> getJobStatus(String jobId) throws BatchContainerServiceException;
Deletes the DB entry for the current job

Throws:
BatchContainerServiceException
//	public abstract void purgeJobStatus() throws BatchContainerServiceException;
Creates a DB entry for the current job

Parameters:
jobStatus
Throws:
BatchContainerServiceException
//	public abstract void createJobStatus(JobStatus jobStatus) throws BatchContainerServiceException;
//	public abstract void registerListener( IJobStatusListener listener) throws BatchContainerServiceException;
//	public abstract void deregisterListener(String listenerId);
New to GrepCode? Check out our FAQ X