All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.azure.batch.CreateTasksErrorException Maven / Gradle / Ivy

There is a newer version: 11.2.0
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.microsoft.azure.batch;

import com.microsoft.azure.batch.protocol.models.BatchErrorException;
import com.microsoft.azure.batch.protocol.models.TaskAddParameter;
import com.microsoft.azure.batch.protocol.models.TaskAddResult;

import java.util.List;

import static java.util.Collections.unmodifiableList;

/**
 * The exception that is thrown when the {@link TaskOperations#createTasks(String, List)} operation is terminated.
 */
public class CreateTasksErrorException extends BatchErrorException {

    /**
     * Initializes a new instance of the CreateTasksErrorException class.
     *
     * @param message The exception message.
     * @param failureTaskList The list of {@link TaskAddResult} instances containing failure details for tasks that were not successfully created.
     * @param pendingTaskList The list of {@link TaskAddParameter} instances containing the tasks that were not added, but for which the operation can be retried.
     */
    public CreateTasksErrorException(final String message, List failureTaskList, List pendingTaskList) {
        super(message, null);
        this.failureTaskList = unmodifiableList(failureTaskList);
        this.pendingTaskList = unmodifiableList(pendingTaskList);
    }

    private List failureTaskList;

    private List pendingTaskList;

    /**
     * @return The list of {@link TaskAddResult} instances containing failure details for tasks that were not successfully created.
     */
    public List failureTaskList() {
        return failureTaskList;
    }

    /**
     * @return The list of {@link TaskAddParameter} instances containing the tasks that were not added, but for which the operation can be retried.
     */
    public List pendingTaskList() {
        return pendingTaskList;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy