001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019package org.apache.oozie; 020 021import java.util.List; 022 023public class CoordinatorJobInfo { 024 private int start; 025 private int len; 026 private int total; 027 private List<CoordinatorJobBean> jobs; 028 029 /** 030 * Create a coordinator info bean. 031 * 032 * @param jobs jobs being returned. 033 * @param start coordiantor jobs offset. 034 * @param len number of coordiantor jobs. 035 * @param total total coordiantor jobs. 036 */ 037 public CoordinatorJobInfo(List<CoordinatorJobBean> jobs, int start, int len, int total) { 038 this.start = start; 039 this.len = len; 040 this.total = total; 041 this.jobs = jobs; 042 } 043 044 /** 045 * Return the coordiantor jobs being returned. 046 * 047 * @return the coordiantor jobs being returned. 048 */ 049 public List<CoordinatorJobBean> getCoordJobs() { 050 return jobs; 051 } 052 053 /** 054 * Return the offset of the workflows being returned. <p> For pagination purposes. 055 * 056 * @return the offset of the coordiantor jobs being returned. 057 */ 058 public int getStart() { 059 return start; 060 } 061 062 /** 063 * Return the number of the workflows being returned. <p> For pagination purposes. 064 * 065 * @return the number of the coordiantor jobs being returned. 066 */ 067 public int getLen() { 068 return len; 069 } 070 071 /** 072 * Return the total number of workflows. <p> For pagination purposes. 073 * 074 * @return the total number of coordiantor jobs. 075 */ 076 public int getTotal() { 077 return total; 078 } 079 080}