com.exasol.bucketfs.uploadnecessity.UploadNecessityCheckStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bucketfs-java Show documentation
Show all versions of bucketfs-java Show documentation
Java library for automating tasks on Exasol's BucketFS.
The newest version!
package com.exasol.bucketfs.uploadnecessity;
import java.nio.file.Path;
import com.exasol.bucketfs.BucketAccessException;
import com.exasol.bucketfs.ReadOnlyBucket;
/**
* This is an interface for strategies that decide if it necessary to upload a file to BucketFS.
*/
public interface UploadNecessityCheckStrategy {
/**
* Decide if it is necessary to upload a file to BucketFS.
*
* @param file local file
* @param fullFileNameInBucketFs path to the file in BucketFS
* @param bucket bucket the file is uploaded to
* @return {@code true} if the file should get uploaded
* @throws BucketAccessException if the necessity check cannot be executed
*/
public boolean isUploadNecessary(Path file, String fullFileNameInBucketFs, ReadOnlyBucket bucket)
throws BucketAccessException;
}