com.atlassian.jira.index.ha
Class IndexSnapshotService

java.lang.Object
  extended by com.atlassian.jira.service.AbstractService
      extended by com.atlassian.jira.index.ha.IndexSnapshotService
All Implemented Interfaces:
ObjectConfigurable, JiraService, Runnable

public class IndexSnapshotService
extends AbstractService

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

Since:
v6.2

Field Summary
static String BACKUP_COUNT
           
static int DEFAULT_COUNT
           
protected static String DEFAULT_DATE_FORMAT
           
protected static String INDEX_SNAPSHOT
           
static String SERVICE_KEY
           
protected static String SERVICE_NAME
           
 
Fields inherited from class com.atlassian.jira.service.AbstractService
log, name, SERVICE_EVENT
 
Fields inherited from interface com.atlassian.jira.service.JiraService
NAME_COMPARATOR
 
Constructor Summary
IndexSnapshotService(IndexPathManager indexPathManager, JiraHome jiraHome, IndexUtils indexUtils)
           
 
Method Summary
protected  int deleteOldSnapshots(int numToKeep)
           
 String getKey()
          Return the key of this object
 ObjectConfiguration getObjectConfiguration()
          Retrieves an object configuration object with properties that can be set
static String getServiceName()
           
 void init(com.opensymphony.module.propertyset.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.
 
Methods inherited from class com.atlassian.jira.service.AbstractService
destroy, getDefaultProperty, getDescription, getLongProperty, getName, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

protected static final String SERVICE_NAME
See Also:
Constant Field Values

BACKUP_COUNT

public static final String BACKUP_COUNT
See Also:
Constant Field Values

DEFAULT_COUNT

public static final int DEFAULT_COUNT
See Also:
Constant Field Values

DEFAULT_DATE_FORMAT

protected static final String DEFAULT_DATE_FORMAT
See Also:
Constant Field Values

INDEX_SNAPSHOT

protected static final String INDEX_SNAPSHOT
See Also:
Constant Field Values

SERVICE_KEY

public static final String SERVICE_KEY
See Also:
Constant Field Values
Constructor Detail

IndexSnapshotService

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

init

public void init(com.opensymphony.module.propertyset.PropertySet props)
          throws ObjectConfigurationException
Description copied from interface: JiraService
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.

Specified by:
init in interface JiraService
Overrides:
init in class AbstractService
Parameters:
props - initialisation parameters
Throws:
ObjectConfigurationException - in case of an error with initialisation parameters

getKey

public String getKey()
Description copied from interface: ObjectConfigurable
Return the key of this object

Specified by:
getKey in interface ObjectConfigurable
Overrides:
getKey in class AbstractService
Returns:
Key of object

isUnique

public boolean isUnique()
Description copied from class: AbstractService
By default, services are not unique.

Specified by:
isUnique in interface JiraService
Overrides:
isUnique in class AbstractService
Returns:
false.

isInternal

public boolean isInternal()
Description copied from class: AbstractService
By default, returns false.

Specified by:
isInternal in interface JiraService
Overrides:
isInternal in class AbstractService
Returns:
false

run

public void run()
Description copied from class: AbstractService
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.

Specified by:
run in interface JiraService
Specified by:
run in interface Runnable
Specified by:
run in class AbstractService
See Also:
JiraService.init(com.opensymphony.module.propertyset.PropertySet)

getObjectConfiguration

public ObjectConfiguration getObjectConfiguration()
                                           throws ObjectConfigurationException
Description copied from interface: ObjectConfigurable
Retrieves an object configuration object with properties that can be set

Returns:
ObjectConfiguration object
Throws:
ObjectConfigurationException

deleteOldSnapshots

protected int deleteOldSnapshots(int numToKeep)

getServiceName

public static String getServiceName()


Copyright © 2002-2014 Atlassian. All Rights Reserved.