@Service public class RankIndexServiceImpl extends Object implements RankIndexService
Rank objects that maintain a numeric position index.
The index is loaded from the database once the plugin is initialised. During normal operations, this service takes care of rank change operations
by updating the database, the rank object chain and the position index.
All runtime queries against the position of an issue are hitting the index.| Modifier and Type | Field and Description |
|---|---|
protected LoggerWrapper |
log |
| Constructor and Description |
|---|
RankIndexServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearIndices(com.atlassian.jira.event.ClearCacheEvent event) |
int |
compare(long customFieldId,
long firstId,
long secondId)
Used by Lucene to sort issues by rank
|
long |
getIssuePosition(long customFieldId,
long issueId)
Fetch the position, add issue as last if it's not tracked
|
void |
selfDestruct()
Destroy this service to ensure that we don't have several instances talking to the database in
parallel, in the event of a leaked classloader.
|
protected final LoggerWrapper log
public int compare(long customFieldId,
long firstId,
long secondId)
compare in interface RankIndexServicepublic long getIssuePosition(long customFieldId,
long issueId)
getIssuePosition in interface RankIndexServicepublic void selfDestruct()
@EventListener public void clearIndices(com.atlassian.jira.event.ClearCacheEvent event)
clearIndices in interface RankIndexServiceCopyright © 2007–2015 Atlassian. All rights reserved.