1 /* 2 * Copyright (C) 2010, Google Inc. and others 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the Eclipse Distribution License v. 1.0 which is available at 6 * https://www.eclipse.org/org/documents/edl-v10.php. 7 * 8 * SPDX-License-Identifier: BSD-3-Clause 9 */ 10 11 package org.eclipse.jgit.revwalk; 12 13 import java.io.IOException; 14 15 import org.eclipse.jgit.errors.MissingObjectException; 16 import org.eclipse.jgit.lib.AsyncOperation; 17 18 /** 19 * Queue to lookup and parse objects asynchronously. 20 * 21 * A queue may perform background lookup of objects and supply them (possibly 22 * out-of-order) to the application. 23 */ 24 public interface AsyncRevObjectQueue extends AsyncOperation { 25 /** 26 * Obtain the next object. 27 * 28 * @return the object; null if there are no more objects remaining. 29 * @throws org.eclipse.jgit.errors.MissingObjectException 30 * the object does not exist. There may be more objects 31 * remaining in the iteration, the application should call 32 * {@link #next()} again. 33 * @throws java.io.IOException 34 * the object store cannot be accessed. 35 */ 36 RevObject next() throws MissingObjectException, IOException; 37 }