1 /* 2 * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> 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 package org.eclipse.jgit.transport; 11 12 import java.io.IOException; 13 14 /** 15 * A {@code PackLock} describes a {@code .keep} file that holds a pack in place. 16 * If {@link PackParser#parse(org.eclipse.jgit.lib.ProgressMonitor)} creates 17 * such a pack lock, it returns the lock so that it can be unlocked once the 18 * pack doesn't need a {@code .keep} file anymore. 19 * 20 * @since 6.0 21 */ 22 public interface PackLock { 23 24 /** 25 * Remove the {@code .keep} file that holds a pack in place. 26 * 27 * @throws java.io.IOException 28 * if deletion of the {@code .keep} file failed 29 */ 30 void unlock() throws IOException; 31 }