Class InMemoryRepository.MemRefDatabase
- java.lang.Object
-
- org.eclipse.jgit.lib.RefDatabase
-
- org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase
-
- org.eclipse.jgit.internal.storage.dfs.DfsReftableDatabase
-
- org.eclipse.jgit.internal.storage.dfs.InMemoryRepository.MemRefDatabase
-
- Enclosing class:
- InMemoryRepository
protected class InMemoryRepository.MemRefDatabase extends DfsReftableDatabase
DfsRefDatabase used by InMemoryRepository.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase
DfsRefDatabase.RefCache
-
-
Field Summary
-
Fields inherited from class org.eclipse.jgit.lib.RefDatabase
ALL, MAX_SYMBOLIC_REF_DEPTH, SEARCH_PATH
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MemRefDatabase()
Initialize a new in-memory ref database.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReftableConfig
getReftableConfig()
Get configuration to write new reftables with.boolean
performsAtomicTransactions()
Whether the database is capable of performing batch updates as atomic transactions.-
Methods inherited from class org.eclipse.jgit.internal.storage.dfs.DfsReftableDatabase
cachePeeledState, compactDuringCommit, compareAndPut, compareAndRemove, exactRef, getLock, getRefs, getRefsByPrefix, getRefsByPrefixWithExclusions, getTipsWithSha1, hasFastTipsWithSha1, hasVersioning, isNameConflicting, newBatchUpdate, peel, scanAllRefs, stack
-
Methods inherited from class org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase
close, create, getAdditionalRefs, getRepository, newRename, newUpdate, refresh
-
Methods inherited from class org.eclipse.jgit.lib.RefDatabase
exactRef, findRef, findRef, firstExactRef, getConflictingNames, getRef, getRefs, getRefsByPrefix, hasRefs
-
-
-
-
Method Detail
-
getReftableConfig
public ReftableConfig getReftableConfig()
Description copied from class:DfsReftableDatabase
Get configuration to write new reftables with.- Overrides:
getReftableConfig
in classDfsReftableDatabase
- Returns:
- configuration to write new reftables with.
-
performsAtomicTransactions
public boolean performsAtomicTransactions()
Description copied from class:DfsReftableDatabase
Whether the database is capable of performing batch updates as atomic transactions.If true, by default
BatchRefUpdate
instances will perform updates atomically, meaning either all updates will succeed, or all updates will fail. It is still possible to turn off this behavior on a per-batch basis by callingupdate.setAtomic(false)
.If false,
BatchRefUpdate
instances will never perform updates atomically, and callingupdate.setAtomic(true)
will cause the entire batch to fail withREJECTED_OTHER_REASON
.This definition of atomicity is stronger than what is provided by
ReceivePack
.ReceivePack
will attempt to reject all commands if it knows in advance some commands may fail, even if the storage layer does not support atomic transactions. Here, atomicity applies even in the case of unforeseeable errors.- Overrides:
performsAtomicTransactions
in classDfsReftableDatabase
- Returns:
- whether transactions are atomic by default.
-
-