Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.datapipeline.model;
 
 
Container for the parameters to the ReportTaskProgress operation.

Task runners call ReportTaskProgress when assigned a task to acknowledge that it has the task. If the web service does not receive this acknowledgement within 2 minutes, it assigns the task in a subsequent PollForTask call. After this initial acknowledgement, the task runner only needs to report progress every 15 minutes to maintain its ownership of the task. You can change this reporting time from 15 minutes by specifying a reportProgressTimeout field in your pipeline.

If a task runner does not report its status after 5 minutes, AWS Data Pipeline assumes that the task runner is unable to process the task and reassigns the task in a subsequent response to PollForTask. Task runners should call ReportTaskProgress every 60 seconds.

 
 public class ReportTaskProgressRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.

Constraints:
Length: 1 - 2048
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

 
     private String taskId;

    
Key-value pairs that define the properties of the ReportTaskProgressInput object.
 
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.

Constraints:
Length: 1 - 2048
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Returns:
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.
 
     public String getTaskId() {
         return ;
     }
    
    
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.

Constraints:
Length: 1 - 2048
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
taskId The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.
 
     public void setTaskId(String taskId) {
         this. = taskId;
     }
    
    
The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 2048
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Parameters:
taskId The ID of the task assigned to the task runner. This value is provided in the response for PollForTask.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReportTaskProgressRequest withTaskId(String taskId) {
        this. = taskId;
        return this;
    }

    
Key-value pairs that define the properties of the ReportTaskProgressInput object.

Returns:
Key-value pairs that define the properties of the ReportTaskProgressInput object.
    public java.util.List<FieldgetFields() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Field>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
Key-value pairs that define the properties of the ReportTaskProgressInput object.

Parameters:
fields Key-value pairs that define the properties of the ReportTaskProgressInput object.
    public void setFields(java.util.Collection<Fieldfields) {
        if (fields == null) {
            this. = null;
            return;
        }
        fieldsCopy.addAll(fields);
        this. = fieldsCopy;
    }
    
    
Key-value pairs that define the properties of the ReportTaskProgressInput object.

NOTE: This method appends the values to the existing list (if any). Use setFields(java.util.Collection) or withFields(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
fields Key-value pairs that define the properties of the ReportTaskProgressInput object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ReportTaskProgressRequest withFields(Field... fields) {
        if (getFields() == nullsetFields(new java.util.ArrayList<Field>(fields.length));
        for (Field value : fields) {
            getFields().add(value);
        }
        return this;
    }
    
    
Key-value pairs that define the properties of the ReportTaskProgressInput object.

Returns a reference to this object so that method calls can be chained together.

Parameters:
fields Key-value pairs that define the properties of the ReportTaskProgressInput object.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (fields == null) {
            this. = null;
        } else {
            fieldsCopy.addAll(fields);
            this. = fieldsCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getTaskId() != nullsb.append("TaskId: " + getTaskId() + ",");
        if (getFields() != nullsb.append("Fields: " + getFields() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getTaskId() == null) ? 0 : getTaskId().hashCode()); 
        hashCode = prime * hashCode + ((getFields() == null) ? 0 : getFields().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ReportTaskProgressRequest == falsereturn false;
        
        if (other.getTaskId() == null ^ this.getTaskId() == nullreturn false;
        if (other.getTaskId() != null && other.getTaskId().equals(this.getTaskId()) == falsereturn false
        if (other.getFields() == null ^ this.getFields() == nullreturn false;
        if (other.getFields() != null && other.getFields().equals(this.getFields()) == falsereturn false
        return true;
    }
    
    @Override
    public ReportTaskProgressRequest clone() {
        
            return (ReportTaskProgressRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X