protected class InMemoryRepository.MemRefDatabase extends DfsReftableDatabase
DfsRefDatabase.RefCache
ALL, MAX_SYMBOLIC_REF_DEPTH, SEARCH_PATH
Modifier | Constructor and Description |
---|---|
protected |
MemRefDatabase()
Initialize a new in-memory ref database.
|
Modifier and Type | Method and Description |
---|---|
ReftableConfig |
getReftableConfig()
Get configuration to write new reftables with.
|
boolean |
performsAtomicTransactions()
Whether the database is capable of performing batch updates as atomic
transactions.
|
cachePeeledState, compactDuringCommit, compareAndPut, compareAndRemove, exactRef, getLock, getRef, getRefs, getRefsByPrefix, isNameConflicting, newBatchUpdate, peel, reader, scanAllRefs, stack
close, create, getAdditionalRefs, getRepository, newRename, newUpdate, refresh
exactRef, findRef, firstExactRef, getConflictingNames, getRefs, hasRefs
protected MemRefDatabase()
public ReftableConfig getReftableConfig()
DfsReftableDatabase
getReftableConfig
in class DfsReftableDatabase
public boolean performsAtomicTransactions()
DfsReftableDatabase
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 calling update.setAtomic(false)
.
If false, BatchRefUpdate
instances will
never perform updates atomically, and calling
update.setAtomic(true)
will cause the entire batch to fail with
REJECTED_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.
performsAtomicTransactions
in class DfsReftableDatabase
Copyright © 2018 Eclipse JGit Project. All rights reserved.