| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicBoolean | |
| private final FileRepository | |
| private final ReftableDatabase | |
| private final FileReftableStack |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private void | |
| public void | close()
Implements abstract org. Close any resources held by this database. |
| public void | |
| public static FileReftableDatabase | Returns: a reftable based RefDB from an existing repository.the repository repo, boolean whether to write reflogs writeLogs)Convert FileRepository to a FileReftableDatabase |
| public void | create()
Implements abstract org. Initialize a new reference database at this location. |
| private Ref | |
| public Ref | exactRef(String
the unabbreviated name of the reference. name)Implements abstract org. Read a single reference. |
| public List | getAdditionalRefs()
Implements abstract org. Get the additional reference-like entities from the repository. |
| private ReentrantLock | |
| public ReflogReader | getReflogReader(Ref
a Ref ref)Implements abstract org. Get the reflog reader. |
| public ReflogReader | getReflogReader(String
a refname)java. object.Overrides org. Get the reflog reader |
| public List | |
| public Map | getRefs(String
prefix to search the namespace with; must end with prefix)/.
If the empty string (ALL), obtain a complete snapshot
of all references.Implements abstract org. Get a section of the reference namespace. |
| public List | getRefsByPrefixWithExclusions(String
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)Overrides org. Returns refs whose names start with a given prefix excluding all refs that start with one of the given prefixes. |
| public boolean | hasFastTipsWithSha1()
Overrides org. If the ref database does not support fast inverse queries, it may be advantageous to build a complete SHA1 to ref map in advance for multiple uses. |
| public boolean | Returns: whether the reftable stack is auto-refreshed if it is out of date.Whether the reftable stack is auto-refreshed if it is out of date. |
| public boolean | isNameConflicting(String
proposed name. name)Implements abstract org. Determine if a proposed reference name overlaps with an existing one. |
| public static boolean | Returns: whether the given repo uses reftable for refdb storage.the repository's metadata directory repoDir)Whether the given repo uses reftable for refdb storage |
| public BatchRefUpdate | newBatchUpdate()
Overrides org. Create a new batch update to attempt on this database. |
| public RefRename | newRename(String
name of reference to rename from fromName, String name of reference to rename to toName)Implements abstract org. Create a new update command to rename a reference. |
| public RefUpdate | newUpdate(String
the name of the reference. refName, boolean if detach)true and name is currently a
org., the update will
replace it with an org..
Otherwise, the update will recursively traverse
org.s and operate on the
leaf org..Implements abstract org. Create a new update command to create, modify or delete a reference. |
| public void | packRefs(ProgressMonitor
a progress monitor pm, PackRefsCommand PackRefsCommand to control ref packing behaviorOverrides org. Optimize pack ref storage. |
| public Ref | peel(Ref
The reference to peel ref)Implements abstract org. Peel a possibly unpeeled reference by traversing the annotated tags. |
| public boolean | performsAtomicTransactions()
Overrides org. Whether the database is capable of performing batch updates as atomic transactions. |
| private static Ref | |
| private static Ref | |
| public void | refresh()
Overrides org. Check if the reftable stack is up to date, and if not, reload it. |
| public void | setAutoRefresh(boolean
whether to auto-refresh the reftable stack if it is out of
date. autoRefresh)Whether to auto-refresh the reftable stack if it is out of date. |
| private static void |
| autoRefresh | back to summary |
|---|---|
| private final AtomicBoolean autoRefresh | |
| fileRepository | back to summary |
|---|---|
| private final FileRepository fileRepository | |
| reftableDatabase | back to summary |
|---|---|
| private final ReftableDatabase reftableDatabase | |
| reftableStack | back to summary |
|---|---|
| private final FileReftableStack reftableStack | |
| FileReftableDatabase | back to summary |
|---|---|
| pack-priv FileReftableDatabase(FileRepository repo) throws IOException | |
| FileReftableDatabase | back to summary |
|---|---|
| pack-priv FileReftableDatabase(FileRepository repo, File refstackName) throws IOException | |
| addReftable | back to summary |
|---|---|
| private boolean addReftable(FileReftableStack. | |
| autoRefresh | back to summary |
|---|---|
| private void autoRefresh() | |
| close | back to summary |
|---|---|
| public void close() Implements abstract org. Doc from org. Close any resources held by this database.
| |
| compactFully | back to summary |
|---|---|
| public void compactFully() throws IOException Runs a full compaction for GC purposes.
| |
| convertFrom | back to summary |
|---|---|
| public static FileReftableDatabase convertFrom(FileRepository repo, boolean writeLogs) throws IOException Convert FileRepository to a FileReftableDatabase
| |
| create | back to summary |
|---|---|
| public void create() throws IOException Implements abstract org. Doc from org. Initialize a new reference database at this location.
| |
| doPeel | back to summary |
|---|---|
| private Ref doPeel(Ref leaf) throws IOException | |
| exactRef | back to summary |
|---|---|
| public Ref exactRef(String name) throws IOException Implements abstract org. Doc from org. Read a single reference.
Unlike
| |
| getAdditionalRefs | back to summary |
|---|---|
| public List Implements abstract org. Doc from org. Get the additional reference-like entities from the repository.
The result list includes non-ref items such as MERGE_HEAD and
FETCH_RESULT cast to be refs. The names of these refs are not returned by
| |
| getLock | back to summary |
|---|---|
| private ReentrantLock getLock() | |
| getReflogReader | back to summary |
|---|---|
| public ReflogReader getReflogReader(Ref ref) throws IOException Implements abstract org. Doc from org. Get the reflog reader.
| |
| getReflogReader | back to summary |
|---|---|
| public ReflogReader getReflogReader(String refname) throws IOException Overrides org. Doc from org. Get the reflog reader
| |
| getRefs | back to summary |
|---|---|
| public List Overrides org. Doc from org. Returns all refs.
This includes
Symbolic references to a non-existent ref (for example,
Callers interested in only a portion of the ref hierarchy can call
| |
| getRefs | back to summary |
|---|---|
| public Map Implements abstract org. Doc from org. Get a section of the reference namespace.
| |
| getRefsByPrefixWithExclusions | back to summary |
|---|---|
| public List Overrides org. Doc from org. Returns refs whose names start with a given prefix excluding all refs that start with one of the given prefixes.
The default implementation is not efficient. Implementors of
| |
| hasFastTipsWithSha1 | back to summary |
|---|---|
| public boolean hasFastTipsWithSha1() throws IOException Overrides org. Doc from org. If the ref database does not support fast inverse queries, it may be advantageous to build a complete SHA1 to ref map in advance for multiple uses. To let applications decide on this decision, this function indicates whether the inverse map is available.
| |
| isAutoRefresh | back to summary |
|---|---|
| public boolean isAutoRefresh() Whether the reftable stack is auto-refreshed if it is out of date.
| |
| isNameConflicting | back to summary |
|---|---|
| public boolean isNameConflicting(String name) throws IOException Implements abstract org. Doc from org. Determine if a proposed reference name overlaps with an existing one. Reference names use '/' as a component separator, and may be stored in a hierarchical storage such as a directory on the local filesystem. If the reference "refs/heads/foo" exists then "refs/heads/foo/bar" must not exist, as a reference cannot have a value and also be a container for other references at the same time. If the reference "refs/heads/foo/bar" exists than the reference "refs/heads/foo" cannot exist, for the same reason.
| |
| isReftable | back to summary |
|---|---|
| public static boolean isReftable(File repoDir) Whether the given repo uses reftable for refdb storage
| |
| newBatchUpdate | back to summary |
|---|---|
| public BatchRefUpdate newBatchUpdate() Overrides org. Doc from org. Create a new batch update to attempt on this database. The default implementation performs a sequential update of each command.
| |
| newRename | back to summary |
|---|---|
| public RefRename newRename(String fromName, String toName) throws IOException Implements abstract org. Doc from org. Create a new update command to rename a reference.
| |
| newUpdate | back to summary |
|---|---|
| public RefUpdate newUpdate(String refName, boolean detach) throws IOException Implements abstract org. Doc from org. Create a new update command to create, modify or delete a reference.
| |
| packRefs | back to summary |
|---|---|
| public void packRefs(ProgressMonitor pm, PackRefsCommand packRefs) throws IOException Overrides org. Doc from org. Optimize pack ref storage. For Reftable, all the data is compacted into a single table.
| |
| peel | back to summary |
|---|---|
| public Ref peel(Ref ref) throws IOException Implements abstract org. Doc from org. Peel a possibly unpeeled reference by traversing the annotated tags.
If the reference cannot be peeled (as it does not refer to an annotated
tag) the peeled id stays null, but
Implementors should check
| |
| performsAtomicTransactions | back to summary |
|---|---|
| public boolean performsAtomicTransactions() Overrides org. Doc from org. Whether the database is capable of performing batch updates as atomic transactions.
If true, by default
If false,
This definition of atomicity is stronger than what is provided by
| |
| recreate | back to summary |
|---|---|
| private static Ref recreate(Ref old, Ref leaf, boolean hasVersioning) | |
| refForWrite | back to summary |
|---|---|
| private static Ref refForWrite(RevWalk rw, Ref r) throws IOException | |
| refresh | back to summary |
|---|---|
| public void refresh() Overrides org. Doc from org. Check if the reftable stack is up to date, and if not, reload it. Triggers a refresh of all internal data structures. In case the RefDatabase implementation has internal caches this method will trigger that all these caches are cleared. Implementors should overwrite this method if they use any kind of caches.
| |
| setAutoRefresh | back to summary |
|---|---|
| public void setAutoRefresh(boolean autoRefresh) Whether to auto-refresh the reftable stack if it is out of date.
| |
| writeConvertTable | back to summary |
|---|---|
| private static void writeConvertTable(Repository repo, ReftableWriter w, boolean writeLogs) throws IOException | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| FileRefRename | back to summary |
|---|---|
| pack-priv FileRefRename(RefUpdate src, RefUpdate dst) | |
| doRename | back to summary |
|---|---|
| protected RefUpdate. Implements abstract org. Doc from org. Do the actual rename
| |
| writeRename | back to summary |
|---|---|
| pack-priv void writeRename(ReftableWriter w) throws IOException | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | applyUpdates(List<Ref>
the new refs to create newRefs, List<ReceiveCommand> the pending receive commands to be executed pending)Implements abstract org. Implements the storage-specific part of the update. |
| FileReftableBatchRefUpdate | back to summary |
|---|---|
| pack-priv FileReftableBatchRefUpdate(FileReftableDatabase db, Repository repository) | |
| applyUpdates | back to summary |
|---|---|
| protected void applyUpdates(List<Ref> newRefs, List<ReceiveCommand> pending) throws IOException Implements abstract org. Doc from org. Implements the storage-specific part of the update.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected RefUpdate. | doDelete(RefUpdate.
a desiredResultorg. object.Implements abstract org. Do delete |
| protected RefUpdate. | doLink(String
a target)java. object.Implements abstract org. Do link |
| protected RefUpdate. | doUpdate(RefUpdate.
a desiredResultorg. object.Implements abstract org. Do update |
| protected RefDatabase | getRefDatabase()
Implements abstract org. Get the reference database this update modifies. |
| public PersonIdent | getRefLogIdent()
Overrides org. Get identity of the user making the change in the reflog. |
| protected Repository | getRepository()
Implements abstract org. Get the repository storing the database's objects. |
| protected boolean | tryLock(boolean
true if the lock should be taken against the leaf level
reference; false if it should be taken exactly against the
current reference. deref)Implements abstract org. Try to acquire the lock on the reference. |
| protected void | unlock()
Implements abstract org. Releases the lock taken by |
| public RefUpdate. | update(RevWalk
a RevWalk instance this update command can borrow to perform
the merge test. The walk will be reset to perform the test. walk)Overrides org. Gracefully update the ref to the new value. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void |
| FileReftableRefUpdate | back to summary |
|---|---|
| pack-priv FileReftableRefUpdate(Ref ref) | |
| doDelete | back to summary |
|---|---|
| protected RefUpdate. Implements abstract org. Doc from org. Do delete
| |
| doLink | back to summary |
|---|---|
| protected RefUpdate. Implements abstract org. Doc from org. Do link
| |
| doUpdate | back to summary |
|---|---|
| protected RefUpdate. Implements abstract org. Doc from org. Do update
| |
| getRefDatabase | back to summary |
|---|---|
| protected RefDatabase getRefDatabase() Implements abstract org. Doc from org. Get the reference database this update modifies.
| |
| getRefLogIdent | back to summary |
|---|---|
| public PersonIdent getRefLogIdent() Overrides org. Doc from org. Get identity of the user making the change in the reflog.
| |
| getRepository | back to summary |
|---|---|
| protected Repository getRepository() Implements abstract org. Doc from org. Get the repository storing the database's objects.
| |
| tryLock | back to summary |
|---|---|
| protected boolean tryLock(boolean deref) throws IOException Implements abstract org. Doc from org. Try to acquire the lock on the reference.
If the locking was successful the implementor must set the current
identity value by calling
| |
| unlock | back to summary |
|---|---|
| protected void unlock() Implements abstract org. Doc from org. Releases the lock taken by
| |
| update | back to summary |
|---|---|
| public RefUpdate. Overrides org. Doc from org. Gracefully update the ref to the new value.
Merge test will be performed according to
| |
| writeDelete | back to summary |
|---|---|
| pack-priv void writeDelete(ReftableWriter w) throws IOException | |
| writeLink | back to summary |
|---|---|
| pack-priv void writeLink(ReftableWriter w) throws IOException | |
| writeUpdate | back to summary |
|---|---|
| pack-priv void writeUpdate(ReftableWriter w) throws IOException | |