Package com.atlassian.jira.service
Interface JiraServiceContainer
- All Superinterfaces:
JiraService
,ObjectConfigurable
,Runnable
- All Known Implementing Classes:
JiraServiceContainerImpl
,MockJiraServiceContainer
,UnloadableJiraServiceContainer
Proxies calls to JiraService & manages delay between calls.
- See Also:
-
Field Summary
Fields inherited from interface com.atlassian.jira.service.JiraService
NAME_COMPARATOR
-
Method Summary
Modifier and TypeMethodDescriptionGet the cron expression.long
getDelay()
Get the delay time for this service.getId()
long
Class<? extends JiraService>
boolean
isDueAt
(long time) Is this service due to run at the specified time.boolean
Returns true if in a clustered environment this service should run locally on every node.boolean
boolean
isUsable()
void
setCronExpression
(String cron) Set the cron expression.void
setDelay
(long delay) Set the delay time for this service.void
Deprecated.Since 6.2Methods inherited from interface com.atlassian.jira.service.JiraService
destroy, getDescription, getName, init, init, isInternal, isUnique, run, setName
Methods inherited from interface com.atlassian.configurable.ObjectConfigurable
getDefaultProperty, getKey, getLongProperty, getObjectConfiguration, getProperties, getProperty, getTextProperty, hasProperty
-
Method Details
-
getId
Long getId() -
getDelay
long getDelay()Get the delay time for this service. Values < 0 indicate this delay is not used. (For backward compatibility with the interface). The delay value will only be used if a Cron Expression is not supplied.- Returns:
- the interval delay for scheduling the service
-
setDelay
void setDelay(long delay) Set the delay time for this service. Values < 0 indicate this delay is not used. (For backward compatibility with the interface). The delay value will only be used if a Cron Expression is not supplied. -
getCronExpression
String getCronExpression()Get the cron expression.- Returns:
- cron Cron Expression
- Since:
- v6.4
-
setCronExpression
Set the cron expression.- Parameters:
cron
- Cron Expression- Since:
- v6.4
-
getLastRun
long getLastRun() -
setLastRun
void setLastRun()Deprecated.Since 6.2Record when run. -
isDueAt
boolean isDueAt(long time) Is this service due to run at the specified time.- Parameters:
time
- the time to check whether it is due.- Returns:
- true if due.
-
isRunning
boolean isRunning() -
getServiceClass
String getServiceClass() -
getServiceClassObject
- Returns:
- the Class object of the underlying service, or null if service could not be loaded
- Since:
- 5.0
-
isUsable
boolean isUsable() -
isLocalService
boolean isLocalService()Returns true if in a clustered environment this service should run locally on every node.- Returns:
- true if in a clustered environment this service should run locally on every node.
- Since:
- v6.3
-