Update FileActor.java

This commit is contained in:
Andrea Cavalli 2020-12-04 17:33:29 +01:00
parent c7540aebe2
commit a25ad89f4b

View File

@ -20,7 +20,6 @@ package org.warp.filesponge.api;
import java.time.Duration;
import java.util.Optional;
import org.jetbrains.annotations.Nullable;
import org.warp.filesponge.value.FileURI;
/**
@ -55,21 +54,19 @@ public interface FileActor {
/**
* Send a "download file" signal
*
* @param fileURI File URI
* @param timeout if it's null the method will return immediately, if it's set the method will wait until a file
* @param timeout if it's 0 the method will return immediately, if it's set the method will wait until a file
* <b>download request</b> has been found, or the timeout time elapsed
* @return empty if no pending <b>download requests</b> has been found, true if the signal can be sent, false
* otherwise
*/
Optional<Boolean> downloadNextFile(FileURI fileURI, @Nullable Duration timeout);
Optional<Boolean> downloadNextFile(Duration timeout);
/**
* Send a "delete file" signal
*
* @param fileURI File URI
* @param timeout if it's null the method will return immediately, if it's set the method will wait until a file
* @param timeout if it's 0 the method will return immediately, if it's set the method will wait until a file
* <b>delete request</b> has been found, or the timeout time elapsed
* @return empty if no pending <b>delete requests</b> has been found, true if the signal can be sent, false otherwise
*/
Optional<Boolean> deleteNextFile(FileURI fileURI, @Nullable Duration timeout);
Optional<Boolean> deleteNextFile(Duration timeout);
}