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
- Direct Known Subclasses:
RefsUnreadableInMemoryRepository.RefsUnreadableRefDatabase
- Enclosing class:
InMemoryRepository
DfsRefDatabase used by InMemoryRepository.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase
DfsRefDatabase.RefCache
-
Field Summary
FieldsFields inherited from class org.eclipse.jgit.internal.storage.dfs.DfsReftableDatabase
reftableDatabase
Fields inherited from class org.eclipse.jgit.lib.RefDatabase
ALL, MAX_SYMBOLIC_REF_DEPTH, SEARCH_PATH
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Initialize a new in-memory ref database. -
Method Summary
Modifier and TypeMethodDescriptionGet configuration to write new reftables with.boolean
Whether the database is capable of performing batch updates as atomic transactions.Methods inherited from class org.eclipse.jgit.internal.storage.dfs.DfsReftableDatabase
cachePeeledState, clearCache, compactDuringCommit, compareAndPut, compareAndRemove, exactRef, exists, getLock, getRefs, getRefsByPrefix, getRefsByPrefixWithExclusions, getTipsWithSha1, hasFastTipsWithSha1, hasVersioning, isNameConflicting, newBatchUpdate, peel, removed, scanAllRefs, stack, stored
Methods inherited from class org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase
close, create, doPeel, getAdditionalRefs, getRepository, newRename, newUpdate, recreate, refresh
Methods inherited from class org.eclipse.jgit.lib.RefDatabase
exactRef, findRef, findRef, firstExactRef, getConflictingNames, getRef, getRefs, getRefsByPrefix, hasRefs
-
Field Details
-
performsAtomicTransactions
boolean performsAtomicTransactions
-
-
Constructor Details
-
MemRefDatabase
protected MemRefDatabase()Initialize a new in-memory ref database.
-
-
Method Details
-
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.
-