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

com.yahoo.elide.async.service.storageengine.ResultStorageEngine Maven / Gradle / Ivy

/*
 * Copyright 2020, Yahoo Inc.
 * Licensed under the Apache License, Version 2.0
 * See LICENSE file in project root for terms.
 */

package com.yahoo.elide.async.service.storageengine;

import com.yahoo.elide.async.models.TableExport;
import io.reactivex.Observable;

/**
 * Utility interface used for storing the results of AsyncQuery for downloads.
 */
public interface ResultStorageEngine {
    public static final String RETRIEVE_ERROR = "Unable to retrieve results.";
    public static final String STORE_ERROR = "Unable to store results.";

    /**
     * Stores the result of the query.
     * @param tableExport TableExport object
     * @param result is the observable result obtained by running the query
     * @return String to store as attachment. Can be null.
     */
    public TableExport storeResults(TableExport tableExport, Observable result);

    /**
     * Searches for the async query results by ID and returns the record.
     * @param asyncQueryID is the query ID of the AsyncQuery
     * @return returns the result associated with the AsyncQueryID
     */
    public Observable getResultsByID(String asyncQueryID);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy