Class S3AttachmentServiceImpl
java.lang.Object
com.netflix.genie.web.services.impl.S3AttachmentServiceImpl
- All Implemented Interfaces:
AttachmentService
Implementation of the AttachmentService interface which saves attachments to AWS S3.
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionS3AttachmentServiceImpl
(S3ClientFactory s3ClientFactory, AttachmentServiceProperties attachmentServiceProperties, io.micrometer.core.instrument.MeterRegistry meterRegistry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionsaveAttachments
(String jobId, Set<org.springframework.core.io.Resource> attachments) Save the attachments and return their URIs so agent executing the job can retrieve them.
-
Constructor Details
-
S3AttachmentServiceImpl
public S3AttachmentServiceImpl(S3ClientFactory s3ClientFactory, AttachmentServiceProperties attachmentServiceProperties, io.micrometer.core.instrument.MeterRegistry meterRegistry) Constructor.- Parameters:
s3ClientFactory
- the s3 client factoryattachmentServiceProperties
- the service propertiesmeterRegistry
- the meter registry
-
-
Method Details
-
saveAttachments
public Set<URI> saveAttachments(@Nullable String jobId, Set<org.springframework.core.io.Resource> attachments) throws SaveAttachmentException Save the attachments and return their URIs so agent executing the job can retrieve them.- Specified by:
saveAttachments
in interfaceAttachmentService
- Parameters:
jobId
- The id of the job these attachments are for, if one was present in the job request This is strictly for debugging and logging.attachments
- The attachments sent by the user- Returns:
- The set of
URI
which can be used to retrieve the attachments - Throws:
SaveAttachmentException
- if an error is encountered while saving
-