com.atlassian.bitbucket.idx.CommitIndexer |
Describes an indexer to be notified when commits are added to or removed from a repository.
CommitIndexer
implementations must be thread-safe, because the same instance will be used for
multiple indexing operations in parallel. Any state that needs to be stored during an indexing run should be
stored in the provided IndexingContext
.
Note: The same IndexingContext
is shared between all CommitIndexer
s that are enabled for
a given repository. Implementations should be careful of what they store in it and what names they use for
properties they add to manage memory consumption and avoid collisions with other indexers.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called after the last commit has been processed to allow the indexer to perform any cleanup it needs.
| |||||||||||
Called before the first commit is processed to allow the indexer to perform any setup it needs.
| |||||||||||
Called for each new commit that is added to the repository.
| |||||||||||
Called for each existing commit that is removed from the repository.
|
repository | the repository |
---|
true
if the indexer should index commits for the specified repository
; otherwise,
false
Called after the last commit has been processed to allow the indexer to perform any cleanup it needs.
context | the indexing context |
---|
Called before the first commit is processed to allow the indexer to perform any setup it needs.
context | the indexing context |
---|
Called for each new commit that is added to the repository.
Important: This method will only be called once for a commit during an indexing run, but may be called
multiple times for the same commit across different indexing runs. When new CommitIndexer
s are enabled,
all of the commits that have been added since the last time any CommitIndexer
ran will be passed
to all indexers.
commit | the added commit |
---|---|
context | the indexing context |
Called for each existing commit that is removed from the repository.
Important: This method will only be called once for a commit during an indexing run, but may be called
multiple times for the same commit across different indexing runs. When new CommitIndexer
s are enabled,
all of the commits that have been removed since the last time any CommitIndexer
ran will be passed
to all indexers.
commit | the removed commit |
---|---|
context | the indexing context |