Class RefDirectoryUpdate

    • Field Detail

      • shouldDeref

        private boolean shouldDeref
    • Constructor Detail

    • Method Detail

      • getRefDatabase

        protected RefDirectory getRefDatabase()
        Get the reference database this update modifies.
        Specified by:
        getRefDatabase in class RefUpdate
        Returns:
        the reference database this update modifies.
      • getRepository

        protected Repository getRepository()
        Get the repository storing the database's objects.
        Specified by:
        getRepository in class RefUpdate
        Returns:
        the repository storing the database's objects.
      • tryLock

        protected boolean tryLock​(boolean deref)
                           throws java.io.IOException
        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 class RefUpdate
        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:
        java.io.IOException - the lock couldn't be taken due to an unexpected storage failure, and not because of a concurrent update.
      • toResultString

        private java.lang.String toResultString​(RefUpdate.Result status)
      • doLink

        protected RefUpdate.Result doLink​(java.lang.String target)
                                   throws java.io.IOException
        Do link
        Specified by:
        doLink in class RefUpdate
        Parameters:
        target - a String object.
        Returns:
        RefUpdate.Result.NEW on success.
        Throws:
        java.io.IOException