public class MergeabilityChecker extends Object implements com.google.gerrit.extensions.events.GitReferenceUpdatedListener
Constructor and Description |
---|
MergeabilityChecker(ThreadLocalRequestContext tl,
com.google.gwtorm.server.SchemaFactory<com.google.gerrit.reviewdb.server.ReviewDb> schemaFactory,
IdentifiedUser.GenericFactory identifiedUserFactory,
ChangeControl.GenericFactory changeControlFactory,
com.google.inject.Provider<Mergeable> mergeable,
ChangeIndexer indexer,
WorkQueue.Executor executor,
com.google.gerrit.server.change.MergeabilityCheckQueue mergeabilityCheckQueue,
MetaDataUpdate.Server metaDataUpdateFactory) |
Modifier and Type | Method and Description |
---|---|
void |
onGitReferenceUpdated(com.google.gerrit.extensions.events.GitReferenceUpdatedListener.Event event) |
boolean |
update(com.google.gerrit.reviewdb.client.Change change) |
void |
update(com.google.gerrit.reviewdb.client.Project.NameKey project) |
com.google.common.util.concurrent.CheckedFuture<?,IOException> |
updateAndIndexAsync(com.google.gerrit.reviewdb.client.Change change)
Updates the mergeability flag of the change asynchronously and reindexes
the change in any case.
|
com.google.common.util.concurrent.CheckedFuture<Boolean,IOException> |
updateAsync(com.google.gerrit.reviewdb.client.Change change)
Updates the mergeability flag of the change asynchronously.
|
@Inject public MergeabilityChecker(ThreadLocalRequestContext tl, com.google.gwtorm.server.SchemaFactory<com.google.gerrit.reviewdb.server.ReviewDb> schemaFactory, IdentifiedUser.GenericFactory identifiedUserFactory, ChangeControl.GenericFactory changeControlFactory, com.google.inject.Provider<Mergeable> mergeable, ChangeIndexer indexer, WorkQueue.Executor executor, com.google.gerrit.server.change.MergeabilityCheckQueue mergeabilityCheckQueue, MetaDataUpdate.Server metaDataUpdateFactory)
public void onGitReferenceUpdated(com.google.gerrit.extensions.events.GitReferenceUpdatedListener.Event event)
onGitReferenceUpdated
in interface com.google.gerrit.extensions.events.GitReferenceUpdatedListener
public com.google.common.util.concurrent.CheckedFuture<Boolean,IOException> updateAsync(com.google.gerrit.reviewdb.client.Change change)
change
- the change for which the mergeability flag should be updatedtrue
if the mergeability flag was updated and
the change was reindexed, and false
if the
mergeability flag was not updated and the change was not reindexedpublic com.google.common.util.concurrent.CheckedFuture<?,IOException> updateAndIndexAsync(com.google.gerrit.reviewdb.client.Change change)
change
- the change for which the mergeability flag should be updatedpublic boolean update(com.google.gerrit.reviewdb.client.Change change) throws IOException
IOException
public void update(com.google.gerrit.reviewdb.client.Project.NameKey project) throws IOException
IOException