Class GitModifiedFilesCacheKey
- java.lang.Object
-
- com.google.gerrit.server.patch.gitdiff.GitModifiedFilesCacheKey
-
public abstract class GitModifiedFilesCacheKey extends Object
Cache key for theGitModifiedFilesCache.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGitModifiedFilesCacheKey.Builderstatic classGitModifiedFilesCacheKey.Serializer
-
Constructor Summary
Constructors Constructor Description GitModifiedFilesCacheKey()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.eclipse.jgit.lib.ObjectIdaTree()The git SHA-1ObjectIdof the first git tree object for which the diff should be computed.abstract org.eclipse.jgit.lib.ObjectIdbTree()The git SHA-1ObjectIdof the second git tree object for which the diff should be computed.static GitModifiedFilesCacheKey.Builderbuilder()static GitModifiedFilesCacheKeycreate(Project.NameKey project, org.eclipse.jgit.lib.ObjectId aCommit, org.eclipse.jgit.lib.ObjectId bCommit, int renameScore, org.eclipse.jgit.revwalk.RevWalk rw)abstract Project.NameKeyproject()A specific git project / repository.booleanrenameDetection()Returns true if rename detection was set for this key.abstract intrenameScore()Percentage score used to identify a file as a rename.intweight()Returns the size of the object in bytes
-
-
-
Method Detail
-
project
public abstract Project.NameKey project()
A specific git project / repository.
-
aTree
public abstract org.eclipse.jgit.lib.ObjectId aTree()
The git SHA-1ObjectIdof the first git tree object for which the diff should be computed.
-
bTree
public abstract org.eclipse.jgit.lib.ObjectId bTree()
The git SHA-1ObjectIdof the second git tree object for which the diff should be computed.
-
renameScore
public abstract int renameScore()
Percentage score used to identify a file as a rename. This value is only available ifrenameDetection()is true. Otherwise, this method will return -1.This value will be used to set the rename score of
DiffFormatter.getRenameDetector().
-
renameDetection
public boolean renameDetection()
Returns true if rename detection was set for this key.
-
create
public static GitModifiedFilesCacheKey create(Project.NameKey project, org.eclipse.jgit.lib.ObjectId aCommit, org.eclipse.jgit.lib.ObjectId bCommit, int renameScore, org.eclipse.jgit.revwalk.RevWalk rw) throws IOException
- Throws:
IOException
-
builder
public static GitModifiedFilesCacheKey.Builder builder()
-
weight
public int weight()
Returns the size of the object in bytes
-
-