@PublicApi public interface

JiraServiceContainer

implements JiraService
com.atlassian.jira.service.JiraServiceContainer
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

Proxies calls to JiraService & manages delay between calls.

See Also

Summary

[Expand]
Inherited Fields
From interface com.atlassian.jira.service.JiraService
Public Methods
String getCronExpression()
Get the cron expression.
long getDelay()
Get the delay time for this service.
Long getId()
long getLastRun()
String getServiceClass()
@Nullable Class<? extends JiraService> getServiceClassObject()
boolean isDueAt(long time)
Is this service due to run at the specified time.
boolean isLocalService()
Returns true if in a clustered environment this service should run locally on every node.
boolean isRunning()
boolean isUsable()
void setCronExpression(String cron)
Set the cron expression.
void setDelay(long delay)
Set the delay time for this service.
void setLastRun()
This method is deprecated. Since 6.2
[Expand]
Inherited Methods
From interface com.atlassian.configurable.ObjectConfigurable
From interface com.atlassian.jira.service.JiraService
From interface java.lang.Runnable

Public Methods

public String getCronExpression ()

Get the cron expression.

Returns
  • cron Cron Expression

public 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

public Long getId ()

public long getLastRun ()

public String getServiceClass ()

@Nullable public Class<? extends JiraService> getServiceClassObject ()

Returns
  • the Class object of the underlying service, or null if service could not be loaded

public 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.

public 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.

public boolean isRunning ()

public boolean isUsable ()

public void setCronExpression (String cron)

Set the cron expression.

Parameters
cron Cron Expression

public 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.

public void setLastRun ()

This method is deprecated.
Since 6.2

Record when run.