當前位置: 首頁>>代碼示例>>Java>>正文


Java EventDescription類代碼示例

本文整理匯總了Java中com.amazonaws.services.elasticbeanstalk.model.EventDescription的典型用法代碼示例。如果您正苦於以下問題:Java EventDescription類的具體用法?Java EventDescription怎麽用?Java EventDescription使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


EventDescription類屬於com.amazonaws.services.elasticbeanstalk.model包,在下文中一共展示了EventDescription類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: AWSEBEnvironmentUpdaterThread

import com.amazonaws.services.elasticbeanstalk.model.EventDescription; //導入依賴的package包/類
public AWSEBEnvironmentUpdaterThread(AWSElasticBeanstalk awseb, EnvironmentDescription envd, BuildListener listener, String versionLabel) {
    this.awseb = awseb;
    this.envd = envd;
    this.listener = listener;
    this.versionLabel = versionLabel;
    this.lastEvent = new EventDescription();
    lastEvent.setEventDate(new Date());
    
    // We can make our requests and, hopefully, safely assume the environmentId won't change under us.
    envRequest = new DescribeEnvironmentsRequest().withEnvironmentIds(envd.getEnvironmentId());
    eventRequest = new DescribeEventsRequest().withEnvironmentId(envd.getEnvironmentId());
    
    // Hack to acknowledge that the time of the Jenkins box may not match AWS.
    try {
        DescribeEventsResult lastEntry = awseb.describeEvents(new DescribeEventsRequest()
                                                                    .withEnvironmentId(envd.getEnvironmentId())
                                                                    .withMaxRecords(1));
        lastEvent = lastEntry.getEvents().get(0);
    } catch (Exception e) {
        log("'%s': Unable to get last event, using system current timestamp for event logs", envd.getEnvironmentName());
    }
    eventRequest.withStartTime(lastEvent.getEventDate()); // Initialize to the right start time.
    
    this.environmentId = envd.getEnvironmentId();
    nAttempt = 0;

}
 
開發者ID:DavidTanner,項目名稱:aws-beanstalk-publisher,代碼行數:28,代碼來源:AWSEBEnvironmentUpdaterThread.java

示例2: compareEventDescriptions

import com.amazonaws.services.elasticbeanstalk.model.EventDescription; //導入依賴的package包/類
private boolean compareEventDescriptions(EventDescription first, EventDescription second) {
    boolean isEqual = first.getApplicationName().equals(second.getApplicationName());
    isEqual &= first.getEnvironmentName().equals(second.getEnvironmentName());
    isEqual &= first.getMessage().equals(second.getMessage());
    isEqual &= first.getSeverity().equals(second.getSeverity());
    isEqual &= first.getEventDate().getTime() == second.getEventDate().getTime();
    return isEqual;
}
 
開發者ID:DavidTanner,項目名稱:aws-beanstalk-publisher,代碼行數:9,代碼來源:AWSEBEnvironmentUpdaterThread.java


注:本文中的com.amazonaws.services.elasticbeanstalk.model.EventDescription類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。