View Javadoc
1   /*
2    * Copyright (C) 2016, 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.internal.ketch;
12  
13  import org.eclipse.jgit.revwalk.FooterKey;
14  
15  /**
16   * Frequently used constants in a Ketch system.
17   */
18  public class KetchConstants {
19  	/**
20  	 * Default reference namespace holding {@link #ACCEPTED} and
21  	 * {@link #COMMITTED} references and the {@link #STAGE} sub-namespace.
22  	 */
23  	public static final String DEFAULT_TXN_NAMESPACE = "refs/txn/"; //$NON-NLS-1$
24  
25  	/** Reference name holding the RefTree accepted by a follower. */
26  	public static final String ACCEPTED = "accepted"; //$NON-NLS-1$
27  
28  	/** Reference name holding the RefTree known to be committed. */
29  	public static final String COMMITTED = "committed"; //$NON-NLS-1$
30  
31  	/** Reference subdirectory holding proposed heads. */
32  	public static final String STAGE = "stage/"; //$NON-NLS-1$
33  
34  	/** Footer containing the current term. */
35  	public static final FooterKeyooterKey.html#FooterKey">FooterKey TERM = new FooterKey("Term"); //$NON-NLS-1$
36  
37  	/** Section for Ketch configuration ({@code ketch}). */
38  	public static final String CONFIG_SECTION_KETCH = "ketch"; //$NON-NLS-1$
39  
40  	/** Behavior for a replica ({@code remote.$name.ketch-type}) */
41  	public static final String CONFIG_KEY_TYPE = "ketch-type"; //$NON-NLS-1$
42  
43  	/** Behavior for a replica ({@code remote.$name.ketch-commit}) */
44  	public static final String CONFIG_KEY_COMMIT = "ketch-commit"; //$NON-NLS-1$
45  
46  	/** Behavior for a replica ({@code remote.$name.ketch-speed}) */
47  	public static final String CONFIG_KEY_SPEED = "ketch-speed"; //$NON-NLS-1$
48  
49  	private KetchConstants() {
50  	}
51  }