【发布时间】:2020-09-07 05:21:08
【问题描述】:
我有一个 groovy 类会产生问题,但是当我需要创建超过 2 个问题时,我会遇到性能问题,这就是为什么我想使用线程来获得更好的性能。
这是我的代码示例。请帮我在这段代码中添加多线程(我想将多线程应用到static void main part):
import // some libraries
class NotificationIssue
{
NotificationIssue()
{
//Some codes
}
def getCustomFieldsValues (issueid)
{
//Some codes
}
def Check3cxPhone()
{
//Some codes
}
def CheckNetworkFolder()
{
//Some codes
}
def setIQLFacadeAndObjectFacade()
{
//Some codes
}
def CheckServerSystemAndUserAccount()
{
//Some codes
}
def CheckService()
{
//Some codes
}
def setIssueInputParameter()
{
//Some codes
}
}
public static void main(String[] args)
{
//1st Notification issue for IT
NotificationIssue NotificationForIT = new NotificationIssue()
def key1 = NotificationForIT.getCustomFieldsValues(issue.key)
NotificationForIT.setIQLFacadeAndObjectFacade()
NotificationForIT.Check3cxPhone()
NotificationForIT.CheckNetworkFolder()
NotificationForIT.CheckServerSystemAndUserAccount()
NotificationForIT.CheckService()
NotificationForIT.setIssueInputParameter(customerRtype, "Notification Issue-", issueType, user,"SD",10200)
//2nd Notification for another department
NotificationIssue StampNotification = new NotificationIssue()
def key2 = StampNotification.getCustomFieldsValues(issue.key)
StampNotification.setIQLFacadeAndObjectFacade()
//3rd Notification issue for...
...
}
【问题讨论】:
标签: multithreading groovy jira