public class NoteDbChangeState extends 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,
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) |
String |
toString() |
static String |
toString(org.eclipse.jgit.lib.ObjectId changeMetaId,
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, 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 IOException
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 IOException
IOException
public static String toString(org.eclipse.jgit.lib.ObjectId changeMetaId, Map<com.google.gerrit.reviewdb.client.Account.Id,org.eclipse.jgit.lib.ObjectId> draftIds)
public boolean isChangeUpToDate(RefCache changeRepoRefs) throws IOException
IOException
public boolean areDraftsUpToDate(RefCache draftsRepoRefs, com.google.gerrit.reviewdb.client.Account.Id accountId) throws IOException
IOException
public org.eclipse.jgit.lib.ObjectId getChangeMetaId()