Class LocalFileSystemAttachmentServiceImpl
- java.lang.Object
- 
- com.netflix.genie.web.services.impl.LocalFileSystemAttachmentServiceImpl
 
- 
- All Implemented Interfaces:
- AttachmentService
 
 public class LocalFileSystemAttachmentServiceImpl extends java.lang.Object implements AttachmentService Implementation ofAttachmentServicethat saves the files to a local directory.N.B.: This implementation is currently used for integration tests and lacks some aspects that would make it usable in production environments (e.g., garbage collection of old files, metrics, etc.). - Since:
- 4.0.0
 
- 
- 
Constructor SummaryConstructors Constructor Description LocalFileSystemAttachmentServiceImpl(AttachmentServiceProperties attachmentServiceProperties)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.net.URI>saveAttachments(java.lang.String jobId, java.util.Set<org.springframework.core.io.Resource> attachments)Save the attachments and return their URIs so agent executing the job can retrieve them.
 
- 
- 
- 
Constructor Detail- 
LocalFileSystemAttachmentServiceImplpublic LocalFileSystemAttachmentServiceImpl(AttachmentServiceProperties attachmentServiceProperties) throws java.io.IOException Constructor.- Parameters:
- attachmentServiceProperties- the service properties
- Throws:
- java.io.IOException- when failing to create the attachments directory
 
 
- 
 - 
Method Detail- 
saveAttachmentspublic java.util.Set<java.net.URI> saveAttachments(@Nullable java.lang.String jobId, java.util.Set<org.springframework.core.io.Resource> attachments) throws SaveAttachmentExceptionSave the attachments and return their URIs so agent executing the job can retrieve them.- Specified by:
- saveAttachmentsin interface- AttachmentService
- 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 URIwhich can be used to retrieve the attachments
- Throws:
- SaveAttachmentException- if an error is encountered while saving
 
 
- 
 
-