com.atlassian.jira.service.ServiceManager |
![]() |
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).
@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).
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ServiceManager.ServiceScheduleSkipper | This interface is deprecated. v6.2 This is no longer used. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SERVICE_ID_KEY |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
addService(String, String, String) instead. Since v6.4.
| |||||||||||
This will add a service configuration to the JIRA DB and the service to the list of services which are running.
| |||||||||||
This method is deprecated.
Use
addService(String, Class, String, java.util.Map) instead. Since v6.4.
| |||||||||||
This will add a service configuration to the JIRA DB and the service to the list of services which are running with
an optional list of params.
| |||||||||||
This method is deprecated.
Use
addService(String, String, String) instead. Since v6.4.
| |||||||||||
This will add a service configuration to the JIRA DB and the service to the list of services which are running with
an optional list of params.
| |||||||||||
This will add a service configuration to the JIRA DB and the service to the list of services which are running with
an optional list of params.
| |||||||||||
This method is deprecated.
Use
addService(String, String, String, java.util.Map) instead. Since v6.4.
| |||||||||||
This will add a service configuration to the JIRA DB and the service to the list of services which are running with
an optional list of params.
| |||||||||||
This will add a service configuration to the JIRA DB and the service to the list of services which are running.
| |||||||||||
Quick way of telling whether a service with a specific id is registered or not.
| |||||||||||
This method is deprecated.
Use
editService(Long, String, java.util.Map) instead. Since v6.4.
| |||||||||||
This will update the service if a service with this id can be found.
| |||||||||||
This will update the service if a service by this name can be found.
| |||||||||||
This method is deprecated.
Use
editServiceByName(String, String, java.util.Map) instead. Since v6.4.
| |||||||||||
This method is deprecated.
v6.2 This is no longer used. Just call
runNow(long)
| |||||||||||
This will return a JiraServiceContainer for the provided id if one is registered otherwise it will return null.
| |||||||||||
This will return a JiraServiceContainer for the provided name if one is registered, otherwise this will return
null.
| |||||||||||
This gets all currently registered services with JIRA.
| |||||||||||
This method is deprecated.
since v6.2 This is going away, it was always only meant for internal use.
| |||||||||||
Gets the services that can be managed by an specific user.
| |||||||||||
This will force a complete re-sync of the service cache with the values stored in the db.
| |||||||||||
This will update the in-memory cache with the values from the db for the service with the id if it can be resolved.
| |||||||||||
This will update the in-memory cache with the values from the db for the named service if it can be resolved.
| |||||||||||
This will remove a service from the db and cache and it will try to resolve the service by id.
| |||||||||||
This will remove a service from the db and cache and it will try to resolve the service by name.
| |||||||||||
Runs the service immediately.
|
This method is deprecated.
Use addService(String, String, String)
instead. Since v6.4.
This will add a service configuration to the JIRA DB and the service to the list of services which are running.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
className | the class defining the service |
delay | how often the service should run in milliseconds |
ServiceException | If there is an error creating the Service. |
---|---|
ClassNotFoundException | If the className could not be resolved. |
This will add a service configuration to the JIRA DB and the service to the list of services which are running.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
serviceClass | the class defining the service |
cronExpression | how the service should be scheduled |
ServiceException | If there is an error creating the Service. |
---|
This method is deprecated.
Use addService(String, Class, String, java.util.Map)
instead. Since v6.4.
This will add a service configuration to the JIRA DB and the service to the list of services which are running with an optional list of params.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
serviceClass | the class defining the service |
delay | how often the service should run in milliseconds |
params | Additional params to specify for the service |
ServiceException | If there is an error creating the Service. |
---|
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
This will add a service configuration to the JIRA DB and the service to the list of services which are running with an optional list of params.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
serviceClass | the class defining the service |
cronExpression | how the service should be scheduled |
delay | How often the service should run in milliseconds. This is not used, but the value will be retained and will be used in place of the cron expression if the instance is downgraded to a JIRA version prior to 6.4. |
params | Additional params to specify for the service |
ServiceException | If there is an error creating the Service. |
---|
This method is deprecated.
Use addService(String, String, String)
instead. Since v6.4.
This will add a service configuration to the JIRA DB and the service to the list of services which are running.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
serviceClass | the class defining the service |
delay | how often the service should run in milliseconds |
ServiceException | If there is an error creating the Service. |
---|
This will add a service configuration to the JIRA DB and the service to the list of services which are running with an optional list of params.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
serviceClass | the class defining the service |
cronExpression | how the service should be scheduled |
params | Additional params to specify for the service |
ServiceException | If there is an error creating the Service. |
---|
This will add a service configuration to the JIRA DB and the service to the list of services which are running with an optional list of params.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
className | the class defining the service |
cronExpression | how the service should be scheduled |
delay | How often the service should run in milliseconds. This is not used, but the value will be retained and will be used in place of the cron expression if the instance is downgraded to a JIRA version prior to 6.4. |
params | Additional params to specify for the service |
ServiceException | If there is an error creating the Service. |
---|---|
ClassNotFoundException | If the className could not be resolved. |
This method is deprecated.
Use addService(String, String, String, java.util.Map)
instead. Since v6.4.
This will add a service configuration to the JIRA DB and the service to the list of services which are running with an optional list of params.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
className | the class defining the service |
delay | how often the service should run in milliseconds |
params | Additional params to specify for the service |
ServiceException | If there is an error creating the Service. |
---|---|
ClassNotFoundException | If the className could not be resolved. |
This will add a service configuration to the JIRA DB and the service to the list of services which are running with an optional list of params.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
className | the class defining the service |
cronExpression | how the service should be scheduled |
params | Additional params to specify for the service |
ServiceException | If there is an error creating the Service. |
---|---|
ClassNotFoundException | If the className could not be resolved. |
This will add a service configuration to the JIRA DB and the service to the list of services which are running.
It is preferred to pass the actual Class rather than the class name when adding services to JIRA from plugins, because it avoids possible ClassLoader issues. See http://jira.atlassian.com/browse/JRA-18578.
name | the key this service is to be known by |
---|---|
className | the class defining the service |
cronExpression | how the service should be scheduled |
ServiceException | If there is an error creating the Service. |
---|---|
ClassNotFoundException | If the className could not be resolved. |
Quick way of telling whether a service with a specific id is registered or not.
id | service id |
---|
This method is deprecated.
Use editService(Long, String, java.util.Map)
instead. Since v6.4.
This will update the service if a service with this id can be found. The delay and the params will be updated.
id | the id of the service to find. |
---|---|
delay | the delay to set on the service in milliseconds |
params | the params to set on the service |
Exception | if there is a problem updating the value |
---|
This will update the service if a service with this id can be found. The cronExpression and the params will be updated.
id | the id of the service to find. |
---|---|
cronExpression | how the service should be scheduled |
params | the params to set on the service |
Exception | if there is a problem updating the value |
---|
This will update the service if a service by this name can be found. The cronExpression and the params will be updated.
name | the name of the service to find. |
---|---|
cronExpression | how the service should be scheduled |
params | the params to set on the service |
IllegalArgumentException | if the name can not be resolved |
---|---|
Exception |
This method is deprecated.
Use editServiceByName(String, String, java.util.Map)
instead. Since v6.4.
This will update the service if a service by this name can be found. The delay and the params will be updated.
name | the name of the service to find. |
---|---|
delay | the delay to set on the service in milliseconds |
params | the params to set on the service |
IllegalArgumentException | if the name can not be resolved |
---|---|
Exception |
This method is deprecated.
v6.2 This is no longer used. Just call runNow(long)
Returns the service schedule skipper.
This will return a JiraServiceContainer for the provided id if one is registered otherwise it will return null.
id | service id |
---|
Exception | if there is a problem looking up the value in the db. |
---|
This will return a JiraServiceContainer for the provided name if one is registered, otherwise this will return null.
name | the name of the JiraServiceContainer |
---|
Exception | if there is a problem looking up the value in the db. |
---|
This gets all currently registered services with JIRA. This is an unmodifiable Collections that is returned, modifications to the services map will be made as a side-effect of calling the edit/refresh/add/remove methods of this manager.
This method is deprecated.
since v6.2 This is going away, it was always only meant for internal use.
Gets the services that are ready for execution at a particular time.
currentTime | the time to check for due services. |
---|
Gets the services that can be managed by an specific user.
user | The user in play. |
---|
This will force a complete re-sync of the service cache with the values stored in the db.
This will update the in-memory cache with the values from the db for the service with the id if it can be resolved.
id | the id of the service to find. |
---|
Exception | if the value can not be refreshed |
---|
This will update the in-memory cache with the values from the db for the named service if it can be resolved.
name | the name of the service to find. |
---|
IllegalArgumentException | if the name can not be resolved |
---|---|
Exception |
This will remove a service from the db and cache and it will try to resolve the service by id.
id | the id of the service to find. |
---|
Exception | if there is a problem removing the service |
---|
This will remove a service from the db and cache and it will try to resolve the service by name.
name | the name of the service to find. |
---|
IllegalArgumentException | if the name can not be resolved |
---|---|
Exception |
Runs the service immediately. This call returns once the job is submitted. It does not wait for the service to complete. In a clustered environment the service may run on any node in the cluster.
Exception |
---|