public class NoteDbChangeState
extends java.lang.Object
Stored serialized in the Change#noteDbState
field, and used to
determine whether the state in NoteDb is out of date.
Serialized in the form:
[meta-sha],[account1]=[drafts-sha],[account2]=[drafts-sha]...in numeric account ID order, with hex SHA-1s for human readability.
Modifier and Type | Class and Description |
---|---|
static class |
NoteDbChangeState.Delta |
Constructor and Description |
---|
NoteDbChangeState(com.google.gerrit.reviewdb.client.Change.Id changeId,
org.eclipse.jgit.lib.ObjectId changeMetaId,
java.util.Map<com.google.gerrit.reviewdb.client.Account.Id,org.eclipse.jgit.lib.ObjectId> draftIds) |
Modifier and Type | Method and Description |
---|---|
static NoteDbChangeState |
applyDelta(com.google.gerrit.reviewdb.client.Change change,
NoteDbChangeState.Delta delta) |
static boolean |
areDraftsUpToDate(NoteDbChangeState state,
RefCache draftsRepoRefs,
com.google.gerrit.reviewdb.client.Change.Id changeId,
com.google.gerrit.reviewdb.client.Account.Id accountId) |
boolean |
areDraftsUpToDate(RefCache draftsRepoRefs,
com.google.gerrit.reviewdb.client.Account.Id accountId) |
org.eclipse.jgit.lib.ObjectId |
getChangeMetaId() |
static boolean |
isChangeUpToDate(NoteDbChangeState state,
RefCache changeRepoRefs,
com.google.gerrit.reviewdb.client.Change.Id changeId) |
boolean |
isChangeUpToDate(RefCache changeRepoRefs) |
static NoteDbChangeState |
parse(com.google.gerrit.reviewdb.client.Change c) |
java.lang.String |
toString() |
static java.lang.String |
toString(org.eclipse.jgit.lib.ObjectId changeMetaId,
java.util.Map<com.google.gerrit.reviewdb.client.Account.Id,org.eclipse.jgit.lib.ObjectId> draftIds) |
public NoteDbChangeState(com.google.gerrit.reviewdb.client.Change.Id changeId, org.eclipse.jgit.lib.ObjectId changeMetaId, java.util.Map<com.google.gerrit.reviewdb.client.Account.Id,org.eclipse.jgit.lib.ObjectId> draftIds)
public static NoteDbChangeState parse(com.google.gerrit.reviewdb.client.Change c)
public static NoteDbChangeState applyDelta(com.google.gerrit.reviewdb.client.Change change, NoteDbChangeState.Delta delta)
public static boolean isChangeUpToDate(NoteDbChangeState state, RefCache changeRepoRefs, com.google.gerrit.reviewdb.client.Change.Id changeId) throws java.io.IOException
java.io.IOException
public static boolean areDraftsUpToDate(NoteDbChangeState state, RefCache draftsRepoRefs, com.google.gerrit.reviewdb.client.Change.Id changeId, com.google.gerrit.reviewdb.client.Account.Id accountId) throws java.io.IOException
java.io.IOException
public static java.lang.String toString(org.eclipse.jgit.lib.ObjectId changeMetaId, java.util.Map<com.google.gerrit.reviewdb.client.Account.Id,org.eclipse.jgit.lib.ObjectId> draftIds)
public boolean isChangeUpToDate(RefCache changeRepoRefs) throws java.io.IOException
java.io.IOException
public boolean areDraftsUpToDate(RefCache draftsRepoRefs, com.google.gerrit.reviewdb.client.Account.Id accountId) throws java.io.IOException
java.io.IOException
public org.eclipse.jgit.lib.ObjectId getChangeMetaId()
public java.lang.String toString()
toString
in class java.lang.Object