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

io.digdag.spi.Storage Maven / Gradle / Ivy

package io.digdag.spi;

import java.io.InputStream;
import java.io.IOException;
import java.util.List;
import com.google.common.base.Optional;

public interface Storage
{
    StorageObject open(String key)
        throws StorageFileNotFoundException;

    interface UploadStreamProvider
    {
        InputStream open() throws IOException;
    }

    String put(String key, long contentLength,
            UploadStreamProvider payload)
        throws IOException;

    interface FileListing
    {
        void accept(List chunk);
    }

    void list(String keyPrefix, FileListing callback);

    default Optional getDirectDownloadHandle(String key)
    {
        return Optional.absent();
    }

    default Optional getDirectUploadHandle(String key)
    {
        return Optional.absent();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy