public class BatchUpdate extends Object implements AutoCloseable
An update operation can be divided into three phases:
Depending on the backend used, each step might support batching, for example
in a BatchRefUpdate or one or more database transactions. All
operations in one phase must complete successfully before proceeding to the
next phase.
| Modifier and Type | Class and Description |
|---|---|
class |
BatchUpdate.ChangeContext |
class |
BatchUpdate.Context |
static interface |
BatchUpdate.Factory |
static class |
BatchUpdate.InsertChangeOp |
static class |
BatchUpdate.Op |
class |
BatchUpdate.RepoContext |
| Modifier and Type | Method and Description |
|---|---|
BatchUpdate |
addOp(com.google.gerrit.reviewdb.client.Change.Id id,
BatchUpdate.Op op) |
void |
close() |
void |
execute() |
org.eclipse.jgit.lib.ObjectInserter |
getObjectInserter() |
org.eclipse.jgit.lib.Repository |
getRepository() |
org.eclipse.jgit.revwalk.RevWalk |
getRevWalk() |
CurrentUser |
getUser() |
BatchUpdate |
insertChange(BatchUpdate.InsertChangeOp op) |
BatchUpdate |
setRepository(org.eclipse.jgit.lib.Repository repo,
org.eclipse.jgit.revwalk.RevWalk revWalk,
org.eclipse.jgit.lib.ObjectInserter inserter) |
public void close()
close in interface AutoCloseablepublic BatchUpdate setRepository(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevWalk revWalk, org.eclipse.jgit.lib.ObjectInserter inserter)
public CurrentUser getUser()
public org.eclipse.jgit.lib.Repository getRepository()
throws IOException
IOExceptionpublic org.eclipse.jgit.revwalk.RevWalk getRevWalk()
throws IOException
IOExceptionpublic org.eclipse.jgit.lib.ObjectInserter getObjectInserter()
throws IOException
IOExceptionpublic BatchUpdate addOp(com.google.gerrit.reviewdb.client.Change.Id id, BatchUpdate.Op op)
public BatchUpdate insertChange(BatchUpdate.InsertChangeOp op)
public void execute()
throws UpdateException,
com.google.gerrit.extensions.restapi.RestApiException
UpdateExceptioncom.google.gerrit.extensions.restapi.RestApiException