Package io.kestra.core.storages
Interface StorageInterface
@Introspected
public interface StorageInterface
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringcachePrefix(String namespace, String flowId, String taskId, String value) createDirectory(String tenantId, URI uri) booleandeleteByPrefix(String tenantId, URI storagePrefix) default StringexecutionPrefix(Execution execution) default StringexecutionPrefix(TaskRun taskRun) default StringexecutionPrefix(Flow flow, Execution execution) default booleanWhether the uri points to a file/object that exist in the internal storage.extractExecutionId(URI path) default URIdefault URIgetAttributes(String tenantId, URI uri) lastModifiedTime(String tenantId, URI uri) Deprecated.default StringnamespaceFilePrefix(String namespace) default URIoutputPrefix(Flow flow) default URIoutputPrefix(Flow flow, Task task, Execution execution, TaskRun taskRun) default URIoutputPrefix(TriggerContext triggerContext, AbstractTrigger trigger, String triggerExecutionId) put(String tenantId, URI uri, InputStream data) Deprecated.UsegetAttributes(String, URI)} instead of individual call for every attributedefault StringstatePrefix(String namespace, String flowId, String name, String value) default URI
-
Method Details
-
get
@Retryable(includes=java.io.IOException.class, excludes=java.io.FileNotFoundException.class) InputStream get(String tenantId, URI uri) throws IOException - Throws:
IOException
-
list
@Retryable(includes=java.io.IOException.class, excludes=java.io.FileNotFoundException.class) List<FileAttributes> list(String tenantId, URI uri) throws IOException - Throws:
IOException
-
exists
Whether the uri points to a file/object that exist in the internal storage.- Parameters:
uri- the URI of the file/object in the internal storage.tenantId- the tenant identifier.- Returns:
- true if the uri points to a file/object that exist in the internal storage.
-
size
@Deprecated @Retryable(includes=java.io.IOException.class, excludes=java.io.FileNotFoundException.class) Long size(String tenantId, URI uri) throws IOException Deprecated.UsegetAttributes(String, URI)} instead of individual call for every attribute- Throws:
IOException
-
lastModifiedTime
@Deprecated @Retryable(includes=java.io.IOException.class, excludes=java.io.FileNotFoundException.class) Long lastModifiedTime(String tenantId, URI uri) throws IOException Deprecated.UsegetAttributes(String, URI)instead of individual call for every attribute- Throws:
IOException
-
getAttributes
@Retryable(includes=java.io.IOException.class, excludes=java.io.FileNotFoundException.class) FileAttributes getAttributes(String tenantId, URI uri) throws IOException - Throws:
IOException
-
put
@Retryable(includes=java.io.IOException.class) URI put(String tenantId, URI uri, InputStream data) throws IOException - Throws:
IOException
-
delete
@Retryable(includes=java.io.IOException.class) boolean delete(String tenantId, URI uri) throws IOException - Throws:
IOException
-
createDirectory
@Retryable(includes=java.io.IOException.class) URI createDirectory(String tenantId, URI uri) throws IOException - Throws:
IOException
-
move
@Retryable(includes=java.io.IOException.class, excludes=java.io.FileNotFoundException.class) URI move(String tenantId, URI from, URI to) throws IOException - Throws:
IOException
-
deleteByPrefix
@Retryable(includes=java.io.IOException.class) List<URI> deleteByPrefix(String tenantId, URI storagePrefix) throws IOException - Throws:
IOException
-
executionPrefix
-
executionPrefix
-
executionPrefix
-
statePrefix
-
cachePrefix
-
namespaceFilePrefix
-
extractExecutionId
-
uri
default URI uri(Flow flow, Execution execution, String inputName, String file) throws URISyntaxException - Throws:
URISyntaxException
-
from
@Retryable(includes=java.io.IOException.class) default URI from(Flow flow, Execution execution, String input, File file) throws IOException - Throws:
IOException
-
from
@Retryable(includes=java.io.IOException.class) default URI from(Flow flow, Execution execution, Input<?> input, File file) throws IOException - Throws:
IOException
-
outputPrefix
-
outputPrefix
-
outputPrefix
default URI outputPrefix(TriggerContext triggerContext, AbstractTrigger trigger, String triggerExecutionId)
-
getAttributes(String, URI)instead of individual call for every attribute