private class FileReftableDatabase.FileReftableRefUpdate extends RefUpdate
RefUpdate.Result| Constructor and Description |
|---|
FileReftableRefUpdate(Ref ref) |
| Modifier and Type | Method and Description |
|---|---|
protected RefUpdate.Result |
doDelete(RefUpdate.Result desiredResult)
Do delete
|
protected RefUpdate.Result |
doLink(java.lang.String target)
Do link
|
protected RefUpdate.Result |
doUpdate(RefUpdate.Result desiredResult)
Do update
|
protected RefDatabase |
getRefDatabase()
Get the reference database this update modifies.
|
PersonIdent |
getRefLogIdent()
Get identity of the user making the change in the reflog.
|
protected Repository |
getRepository()
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 by
RefUpdate.tryLock(boolean) if it succeeded. |
RefUpdate.Result |
update(RevWalk walk)
Gracefully update the ref to the new value.
|
(package private) void |
writeDelete(ReftableWriter w) |
(package private) void |
writeLink(ReftableWriter w) |
(package private) void |
writeUpdate(ReftableWriter w) |
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, updateFileReftableRefUpdate(Ref ref)
protected RefDatabase getRefDatabase()
RefUpdategetRefDatabase in class RefUpdateprotected Repository getRepository()
RefUpdategetRepository in class RefUpdateprotected void unlock()
RefUpdateRefUpdate.tryLock(boolean) if it succeeded.public RefUpdate.Result update(RevWalk walk) throws java.io.IOException
RefUpdate
Merge test will be performed according to RefUpdate.isForceUpdate().
update in class RefUpdatewalk - a RevWalk instance this update command can borrow to perform
the merge test. The walk will be reset to perform the test.java.io.IOException - an unexpected IO error occurred while writing changes.protected boolean tryLock(boolean deref)
throws java.io.IOException
RefUpdate
If the locking was successful the implementor must set the current
identity value by calling RefUpdate.setOldObjectId(ObjectId).
tryLock in class RefUpdatederef - true if the lock should be taken against the leaf level
reference; false if it should be taken exactly against the
current reference.java.io.IOException - the lock couldn't be taken due to an unexpected storage
failure, and not because of a concurrent update.void writeUpdate(ReftableWriter w) throws java.io.IOException
java.io.IOExceptionpublic PersonIdent getRefLogIdent()
RefUpdategetRefLogIdent in class RefUpdatevoid writeDelete(ReftableWriter w) throws java.io.IOException
java.io.IOExceptionprotected RefUpdate.Result doUpdate(RefUpdate.Result desiredResult) throws java.io.IOException
RefUpdatedoUpdate in class RefUpdatedesiredResult - a RefUpdate.Result object.resultjava.io.IOExceptionprotected RefUpdate.Result doDelete(RefUpdate.Result desiredResult) throws java.io.IOException
RefUpdatedoDelete in class RefUpdatedesiredResult - a RefUpdate.Result object.resultjava.io.IOExceptionvoid writeLink(ReftableWriter w) throws java.io.IOException
java.io.IOExceptionprotected RefUpdate.Result doLink(java.lang.String target) throws java.io.IOException
RefUpdatedoLink in class RefUpdatetarget - a String object.RefUpdate.Result.NEW on success.java.io.IOException