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
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
reftableDatabaseFields inherited from class org.eclipse.jgit.lib.RefDatabase
ALL, MAX_SYMBOLIC_REF_DEPTH, SEARCH_PATH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInitialize a new in-memory ref database. -
Method Summary
Modifier and TypeMethodDescriptionGet configuration to write new reftables with.booleanWhether 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, storedMethods inherited from class org.eclipse.jgit.internal.storage.dfs.DfsRefDatabase
close, create, doPeel, getAdditionalRefs, getRepository, newRename, newUpdate, recreate, refreshMethods 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:DfsReftableDatabaseGet configuration to write new reftables with.- Overrides:
getReftableConfigin classDfsReftableDatabase- Returns:
- configuration to write new reftables with.
-
performsAtomicTransactions
public boolean performsAtomicTransactions()Description copied from class:DfsReftableDatabaseWhether the database is capable of performing batch updates as atomic transactions.If true, by default
BatchRefUpdateinstances 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,
BatchRefUpdateinstances 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.ReceivePackwill 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:
performsAtomicTransactionsin classDfsReftableDatabase- Returns:
- whether transactions are atomic by default.
-