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

io.deepsense.neptune.clientlibrary.services.apiservice.retries.RequestRetryOutcome Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
/**
 * Copyright (c) 2016, CodiLime Inc.
 */

package io.deepsense.neptune.clientlibrary.services.apiservice.retries;

import java.util.Optional;

public class RequestRetryOutcome {

    private boolean successful;

    private T value;

    private Runnable postRequestAction;

    public RequestRetryOutcome(boolean successful, T value, Runnable postRequestAction) {
        this.successful = successful;
        this.value = value;
        this.postRequestAction = postRequestAction;
    }

    public boolean isSuccessful() {
        return successful;
    }

    public Optional getValue() {
        return Optional.ofNullable(value);
    }

    public Optional getPostRequestAction() {
        return Optional.ofNullable(postRequestAction);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy