aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackLock.java
blob: bf2140759f4ae0b38bf3fb52e2f82ed3ad2982aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0 which is available at
 * https://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
package org.eclipse.jgit.transport;

import java.io.IOException;

/**
 * A {@code PackLock} describes a {@code .keep} file that holds a pack in place.
 * If {@link PackParser#parse(org.eclipse.jgit.lib.ProgressMonitor)} creates
 * such a pack lock, it returns the lock so that it can be unlocked once the
 * pack doesn't need a {@code .keep} file anymore.
 *
 * @since 6.0
 */
public interface PackLock {

	/**
	 * Remove the {@code .keep} file that holds a pack in place.
	 *
	 * @throws java.io.IOException
	 *             if deletion of the {@code .keep} file failed
	 */
	void unlock() throws IOException;
}