public class

IndexSnapshotService

extends AbstractService
java.lang.Object
   ↳ com.atlassian.jira.service.AbstractService
     ↳ com.atlassian.jira.index.ha.IndexSnapshotService

Class Overview

A service that when run will store a snapshot of the Lucene indexes

Summary

Constants
String BACKUP_COUNT
int DEFAULT_COUNT
String DEFAULT_DATE_FORMAT
String INDEX_SNAPSHOT
String SERVICE_KEY
String SERVICE_NAME
[Expand]
Inherited Constants
From class com.atlassian.jira.service.AbstractService
[Expand]
Inherited Fields
From class com.atlassian.jira.service.AbstractService
From interface com.atlassian.jira.service.JiraService
Public Constructors
IndexSnapshotService(IndexPathManager indexPathManager, JiraHome jiraHome, IndexUtils indexUtils)
Public Methods
String getKey()
Return the key of this object
ObjectConfiguration getObjectConfiguration()
static String getServiceName()
void init(PropertySet props)
Initialise the service.
boolean isInternal()
By default, returns false.
boolean isUnique()
By default, services are not unique.
void run()
This method must be implemented in a subclass, and performs the functionality that the service performs.
Protected Methods
int deleteOldSnapshots(int numToKeep)
[Expand]
Inherited Methods
From class com.atlassian.jira.service.AbstractService
From class java.lang.Object
From interface com.atlassian.configurable.ObjectConfigurable
From interface com.atlassian.jira.service.JiraService
From interface java.lang.Runnable

Constants

public static final String BACKUP_COUNT

Constant Value: "backupCount"

public static final int DEFAULT_COUNT

Constant Value: 3 (0x00000003)

protected static final String DEFAULT_DATE_FORMAT

Constant Value: "yyyy-MMM-dd--HHmm"

protected static final String INDEX_SNAPSHOT

Constant Value: "IndexSnapshot_"

public static final String SERVICE_KEY

Constant Value: "indexsnapshotservice"

protected static final String SERVICE_NAME

Constant Value: "JIRA Index Snapshot Service"

Public Constructors

public IndexSnapshotService (IndexPathManager indexPathManager, JiraHome jiraHome, IndexUtils indexUtils)

Public Methods

public String getKey ()

Return the key of this object

Returns
  • Key of object

public ObjectConfiguration getObjectConfiguration ()

public static String getServiceName ()

public void init (PropertySet props)

Initialise the service. This method is guaranteed to be called before the first call to run().

As the parameters are gained from the user's interaction with the website, it is not guaranteed to be called with the correct, or indeed with any parameters.

init() may be called multiple times during the services lifetime.

Parameters
props initialisation parameters

public boolean isInternal ()

By default, returns false.

Returns
  • false

public boolean isUnique ()

By default, services are not unique.

Returns
  • false.

public void run ()

This method must be implemented in a subclass, and performs the functionality that the service performs. This method is called after the duration specified through the administration web interface.

Protected Methods

protected int deleteOldSnapshots (int numToKeep)