Package software.amazon.awssdk.core
Class FileTransformerConfiguration
- java.lang.Object
-
- software.amazon.awssdk.core.FileTransformerConfiguration
-
- All Implemented Interfaces:
software.amazon.awssdk.utils.builder.ToCopyableBuilder<FileTransformerConfiguration.Builder,FileTransformerConfiguration>
public final class FileTransformerConfiguration extends Object implements software.amazon.awssdk.utils.builder.ToCopyableBuilder<FileTransformerConfiguration.Builder,FileTransformerConfiguration>
Configuration options forAsyncResponseTransformer.toFile(Path, FileTransformerConfiguration)to configure how the SDK should write the file and if the SDK should delete the file when an exception occurs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFileTransformerConfiguration.Builderstatic classFileTransformerConfiguration.FailureBehaviorDefines how the SDK should handle the file if there is an exceptionstatic classFileTransformerConfiguration.FileWriteOptionDefines how the SDK should write the file
-
Method Summary
-
-
-
Method Detail
-
fileWriteOption
public FileTransformerConfiguration.FileWriteOption fileWriteOption()
The configuredFileTransformerConfiguration.FileWriteOption
-
failureBehavior
public FileTransformerConfiguration.FailureBehavior failureBehavior()
The configuredFileTransformerConfiguration.FailureBehavior
-
executorService
public Optional<ExecutorService> executorService()
The configuredExecutorServicethe writes should be executed on.If not set, the default thread pool defined by the underlying
FileSystemProviderwill be used. This will typically be the thread pool defined by theAsynchronousChannelGroup.
-
builder
public static FileTransformerConfiguration.Builder builder()
Create aFileTransformerConfiguration.Builder, used to create aFileTransformerConfiguration.
-
defaultCreateNew
public static FileTransformerConfiguration defaultCreateNew()
Returns the defaultFileTransformerConfigurationforFileTransformerConfiguration.FileWriteOption.CREATE_NEWAlways create a new file. If the file already exists,
FileAlreadyExistsExceptionwill be thrown. In the event of an error, the SDK will attempt to delete the file (whatever has been written to it so far).
-
defaultCreateOrReplaceExisting
public static FileTransformerConfiguration defaultCreateOrReplaceExisting()
Returns the defaultFileTransformerConfigurationforFileTransformerConfiguration.FileWriteOption.CREATE_OR_REPLACE_EXISTINGCreate a new file if it doesn't exist, otherwise replace the existing file. In the event of an error, the SDK will NOT attempt to delete the file, leaving it as-is
-
defaultCreateOrAppend
public static FileTransformerConfiguration defaultCreateOrAppend()
Returns the defaultFileTransformerConfigurationforFileTransformerConfiguration.FileWriteOption.CREATE_OR_APPEND_TO_EXISTINGCreate a new file if it doesn't exist, otherwise append to the existing file. In the event of an error, the SDK will NOT attempt to delete the file, leaving it as-is
-
toBuilder
public FileTransformerConfiguration.Builder toBuilder()
- Specified by:
toBuilderin interfacesoftware.amazon.awssdk.utils.builder.ToCopyableBuilder<FileTransformerConfiguration.Builder,FileTransformerConfiguration>
-
-