MergedReftable that is common to various reftable-using
subclasses of RefDatabase. See
org.eclipse.jgit.internal.storage.dfs.DfsReftableDatabase for an
example.
| Modifier and Type | Field and Description |
|---|---|
| private final ReentrantLock | |
| private Reftable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Ref | |
| public ReentrantLock | |
| public ReflogReader | Returns: a ReflogReader for the given refthe name of the ref. refname)Get ReflogReader |
| public List | Returns: immutable list of refs whose names start withprefix.string that names of refs should start with; may be empty (to
return all refs). prefix)Returns refs whose names start with a given prefix. |
| public List | Returns: immutable list of refs whose names start withinclude and
none of the strings in excludes.string that names of refs should start with; may be empty. include, Set<String> strings that names of refs can't start with; may be empty. excludes)Returns refs whose names start with a given prefix excluding all refs that start with one of the given prefixes. |
| public Set | |
| public boolean | Returns: whether there is a fast SHA1 to ref map.Whether there is a fast SHA1 to ref map |
| public boolean | Returns: whether the given refName would be illegal in a repository that uses loose refs.the name to check refName, TreeSet<String> a sorted set of refs we pretend have been added to the
database. added, Set<String> a set of refs we pretend have been removed from the database. deleted)Whether refName is conflicting |
| public long | Returns: the next available logical timestamp for an additional reftable in the stack.Get next update index |
| protected abstract MergedReftable | Returns: the ReftableStack for this instanceReftableDatabase lazily initializes its merged reftable on the first read after construction or clearCache() call. |
| private Reftable | Returns: the merged reftable that is implemented by the stack of reftables. Return value must be accessed under lock.Get reader for merged reftable |
| public static ReceiveCommand | |
| private static ObjectId |
| lock | back to summary |
|---|---|
| private final ReentrantLock lock | |
| mergedTables | back to summary |
|---|---|
| private Reftable mergedTables | |
| ReftableDatabase | back to summary |
|---|---|
| public ReftableDatabase() | |
| clearCache | back to summary |
|---|---|
| public void clearCache() Drops all data that might be cached in memory. | |
| exactRef | back to summary |
|---|---|
| public Ref exactRef(String name) throws IOException Read a single reference. This method expects an unshortened reference name and does not search using the standard search path.
| |
| getLock | back to summary |
|---|---|
| public ReentrantLock getLock() Get lock
| |
| getReflogReader | back to summary |
|---|---|
| public ReflogReader getReflogReader(String refname) throws IOException Get ReflogReader
| |
| getRefsByPrefix | back to summary |
|---|---|
| public List Returns refs whose names start with a given prefix.
| |
| getRefsByPrefixWithExclusions | back to summary |
|---|---|
| public List Returns refs whose names start with a given prefix excluding all refs that start with one of the given prefixes.
| |
| getTipsWithSha1 | back to summary |
|---|---|
| public Set Returns all refs that resolve directly to the given | |
| hasFastTipsWithSha1 | back to summary |
|---|---|
| public boolean hasFastTipsWithSha1() throws IOException Whether there is a fast SHA1 to ref map
| |
| isNameConflicting | back to summary |
|---|---|
| public boolean isNameConflicting(String refName, TreeSet<String> added, Set<String> deleted) throws IOException Whether refName is conflicting
| |
| nextUpdateIndex | back to summary |
|---|---|
| public long nextUpdateIndex() throws IOException Get next update index
| |
| openMergedReftable | back to summary |
|---|---|
| protected abstract MergedReftable openMergedReftable() throws IOException ReftableDatabase lazily initializes its merged reftable on the first read after construction or clearCache() call. This function should always instantiate a new MergedReftable based on the list of reftables specified by the underlying storage.
| |
| reader | back to summary |
|---|---|
| private Reftable reader() throws IOException Get reader for merged reftable
| |
| toCommand | back to summary |
|---|---|
| public static ReceiveCommand toCommand(Ref oldRef, Ref newRef) Create a ReceiveCommand for the change from oldRef to newRef
| |
| toId | back to summary |
|---|---|
| private static ObjectId toId(Ref ref) | |