Class FileReftableDatabase.FileReftableRefUpdate
java.lang.Object
org.eclipse.jgit.lib.RefUpdate
org.eclipse.jgit.internal.storage.file.FileReftableDatabase.FileReftableRefUpdate
- Enclosing class:
- FileReftableDatabase
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.lib.RefUpdate
RefUpdate.Result
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RefUpdate.Result
doDelete
(RefUpdate.Result desiredResult) Do deleteprotected RefUpdate.Result
Do linkprotected RefUpdate.Result
doUpdate
(RefUpdate.Result desiredResult) Do updateprotected RefDatabase
Get the reference database this update modifies.Get identity of the user making the change in the reflog.protected Repository
Get the repository storing the database's objects.protected boolean
tryLock
(boolean deref) Try to acquire the lock on the reference.protected void
unlock()
Releases the lock taken byRefUpdate.tryLock(boolean)
if it succeeded.Gracefully update the ref to the new value.(package private) void
(package private) void
(package private) void
Methods inherited from class org.eclipse.jgit.lib.RefUpdate
delete, delete, disableRefLog, forceUpdate, getExpectedOldObjectId, getName, getNewObjectId, getOldObjectId, getPushCertificate, getRef, getRefLogMessage, getResult, isDetachingSymbolicRef, isForceRefLog, isForceUpdate, isRefLogIncludingResult, link, setCheckConflicting, setDetachingSymbolicRef, setExpectedOldObjectId, setForceRefLog, setForceUpdate, setNewObjectId, setOldObjectId, setPushCertificate, setRefLogIdent, setRefLogMessage, update
-
Field Details
-
rw
-
dstRef
-
-
Constructor Details
-
FileReftableRefUpdate
FileReftableRefUpdate(Ref ref)
-
-
Method Details
-
getRefDatabase
Description copied from class:RefUpdate
Get the reference database this update modifies.- Specified by:
getRefDatabase
in classRefUpdate
- Returns:
- the reference database this update modifies.
-
getRepository
Description copied from class:RefUpdate
Get the repository storing the database's objects.- Specified by:
getRepository
in classRefUpdate
- Returns:
- the repository storing the database's objects.
-
unlock
protected void unlock()Description copied from class:RefUpdate
Releases the lock taken byRefUpdate.tryLock(boolean)
if it succeeded. -
update
Description copied from class:RefUpdate
Gracefully update the ref to the new value.Merge test will be performed according to
RefUpdate.isForceUpdate()
.- Overrides:
update
in classRefUpdate
- Parameters:
walk
- a RevWalk instance this update command can borrow to perform the merge test. The walk will be reset to perform the test.- Returns:
- the result status of the update.
- Throws:
IOException
- an unexpected IO error occurred while writing changes.
-
tryLock
Description copied from class:RefUpdate
Try to acquire the lock on the reference.If the locking was successful the implementor must set the current identity value by calling
RefUpdate.setOldObjectId(ObjectId)
.- Specified by:
tryLock
in classRefUpdate
- Parameters:
deref
- true if the lock should be taken against the leaf level reference; false if it should be taken exactly against the current reference.- Returns:
- true if the lock was acquired and the reference is likely protected from concurrent modification; false if it failed.
- Throws:
IOException
- the lock couldn't be taken due to an unexpected storage failure, and not because of a concurrent update.
-
writeUpdate
- Throws:
IOException
-
getRefLogIdent
Description copied from class:RefUpdate
Get identity of the user making the change in the reflog.- Overrides:
getRefLogIdent
in classRefUpdate
- Returns:
- identity of the user making the change in the reflog.
-
writeDelete
- Throws:
IOException
-
doUpdate
Description copied from class:RefUpdate
Do update- Specified by:
doUpdate
in classRefUpdate
- Parameters:
desiredResult
- aRefUpdate.Result
object.- Returns:
result
- Throws:
IOException
-
doDelete
Description copied from class:RefUpdate
Do delete- Specified by:
doDelete
in classRefUpdate
- Parameters:
desiredResult
- aRefUpdate.Result
object.- Returns:
result
- Throws:
IOException
-
writeLink
- Throws:
IOException
-
doLink
Description copied from class:RefUpdate
Do link- Specified by:
doLink
in classRefUpdate
- Parameters:
target
- aString
object.- Returns:
RefUpdate.Result.NEW
on success.- Throws:
IOException
-