001/*- 002 * #%L 003 * HAPI FHIR JPA Server - Batch2 Task Processor 004 * %% 005 * Copyright (C) 2014 - 2024 Smile CDR, Inc. 006 * %% 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 * #L% 019 */ 020package ca.uhn.fhir.batch2.api; 021 022import ca.uhn.fhir.batch2.model.StatusEnum; 023 024import java.util.Date; 025 026public interface IJobInstance { 027 String getCurrentGatedStepId(); 028 029 int getErrorCount(); 030 031 String getEstimatedTimeRemaining(); 032 033 boolean isWorkChunksPurged(); 034 035 StatusEnum getStatus(); 036 037 int getJobDefinitionVersion(); 038 039 String getInstanceId(); 040 041 Date getStartTime(); 042 043 Date getEndTime(); 044 045 Integer getCombinedRecordsProcessed(); 046 047 Double getCombinedRecordsProcessedPerSecond(); 048 049 Date getCreateTime(); 050 051 Integer getTotalElapsedMillis(); 052 053 double getProgress(); 054 055 String getErrorMessage(); 056 057 String getWarningMessages(); 058 059 boolean isCancelled(); 060 061 String getReport(); 062 063 /** 064 * @return true if every step of the job has produced exactly 1 chunk. 065 */ 066 boolean isFastTracking(); 067 068 void setFastTracking(boolean theFastTracking); 069}