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

tech.ydb.yoj.repository.db.exception.UnavailableException Maven / Gradle / Ivy

Go to download

Core YOJ (YDB ORM for Java) abstractions and APIs for domain entities, repositories, transactions etc.

There is a newer version: 2.6.1
Show newest version
package tech.ydb.yoj.repository.db.exception;

import lombok.Getter;

public class UnavailableException extends RepositoryException {
    @Getter
    public final boolean alreadyRetried;

    public UnavailableException(String message) {
        super(message);
        this.alreadyRetried = false;
    }

    public UnavailableException(String message, Throwable cause) {
        this(message, cause, false);
    }

    public UnavailableException(String message, Throwable cause, boolean alreadyRetried) {
        super(message, cause);
        this.alreadyRetried = alreadyRetried;
    }

    public static UnavailableException afterRetries(String message, Throwable cause) {
        return new UnavailableException(message, cause, true);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy