class RefTreeUpdate extends RefUpdate
RefTreeDatabase.RefUpdate.Result| Modifier and Type | Field and Description |
|---|---|
private RefTreeBatch |
batch |
private Ref |
oldRef |
private RefTreeDatabase |
refdb |
private RevWalk |
rw |
| Constructor and Description |
|---|
RefTreeUpdate(RefTreeDatabase refdb,
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.
|
protected Repository |
getRepository()
Get the repository storing the database's objects.
|
private Ref |
newRef(java.lang.String name,
ObjectId id) |
private RefUpdate.Result |
run(Ref newRef,
RefUpdate.Result desiredResult) |
(package private) static RefUpdate.Result |
translate(ReceiveCommand.Result r,
RefUpdate.Result desiredResult) |
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. |
delete, delete, disableRefLog, forceUpdate, getExpectedOldObjectId, getName, getNewObjectId, getOldObjectId, getPushCertificate, getRef, getRefLogIdent, getRefLogMessage, getResult, isDetachingSymbolicRef, isForceRefLog, isForceUpdate, isRefLogIncludingResult, link, setCheckConflicting, setDetachingSymbolicRef, setExpectedOldObjectId, setForceRefLog, setForceUpdate, setNewObjectId, setOldObjectId, setPushCertificate, setRefLogIdent, setRefLogMessage, update, updateprivate final RefTreeDatabase refdb
private RevWalk rw
private RefTreeBatch batch
private Ref oldRef
RefTreeUpdate(RefTreeDatabase refdb, Ref ref)
protected RefDatabase getRefDatabase()
getRefDatabase in class RefUpdateprotected Repository getRepository()
getRepository in class RefUpdateprotected boolean tryLock(boolean deref)
throws java.io.IOException
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.protected void unlock()
RefUpdate.tryLock(boolean) if it succeeded.protected RefUpdate.Result doUpdate(RefUpdate.Result desiredResult) throws java.io.IOException
doUpdate in class RefUpdatedesiredResult - a RefUpdate.Result object.resultjava.io.IOExceptionprivate Ref newRef(java.lang.String name, ObjectId id) throws MissingObjectException, java.io.IOException
MissingObjectExceptionjava.io.IOExceptionprotected RefUpdate.Result doDelete(RefUpdate.Result desiredResult) throws java.io.IOException
doDelete in class RefUpdatedesiredResult - a RefUpdate.Result object.resultjava.io.IOExceptionprotected RefUpdate.Result doLink(java.lang.String target) throws java.io.IOException
doLink in class RefUpdatetarget - a String object.RefUpdate.Result.NEW on success.java.io.IOExceptionprivate RefUpdate.Result run(@Nullable Ref newRef, RefUpdate.Result desiredResult) throws java.io.IOException
java.io.IOExceptionstatic RefUpdate.Result translate(ReceiveCommand.Result r, RefUpdate.Result desiredResult)