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

com.yahoo.vespa.config.server.http.v2.PrepareAndActivateResult Maven / Gradle / Ivy

There is a newer version: 8.441.21
Show newest version
package com.yahoo.vespa.config.server.http.v2;

import com.yahoo.config.provision.ParentHostUnavailableException;

/**
 * Allows a partial deployment success, where the application is prepared, but not activated.
 * This currently only allows the parent-host-not-ready and application-lock cases, as other transient errors are
 * thrown too early (LB during prepare, cert during validation), but could be expanded to allow
 * reuse of a prepared session in the future. In that case, users of this result (handler and its client)
 * must also be updated.
 *
 * @author jonmv
 */
public record PrepareAndActivateResult(PrepareResult prepareResult, RuntimeException activationFailure) {

    public PrepareResult deployResult() {
        if (activationFailure != null) throw activationFailure;
        return prepareResult;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy