public class S3StorageService extends Object implements StorageService
| Constructor and Description |
|---|
S3StorageService(com.amazonaws.services.s3.AmazonS3 s3,
String bucketName,
ExecutorService executorService) |
| Modifier and Type | Method and Description |
|---|---|
Stream<AbsoluteLocation<ResolvedResource>> |
list(AbsoluteLocation location)
Lists all resources within bucket and returns absolute resource location for each entry without credentials.
|
boolean |
objectExists(AbsoluteLocation location) |
InputStream |
read(AbsoluteLocation location) |
void |
remove(AbsoluteLocation location) |
OutputStream |
write(AbsoluteLocation location) |
@Inject
public S3StorageService(com.amazonaws.services.s3.AmazonS3 s3,
String bucketName,
ExecutorService executorService)
s3 - Connection to S3bucketName - Bucket to useexecutorService - Multipart sending threadpool (file chunks are sent in parrallel)public Stream<AbsoluteLocation<ResolvedResource>> list(AbsoluteLocation location)
list in interface StorageListServicepublic InputStream read(AbsoluteLocation location)
read in interface StorageReadServicepublic OutputStream write(AbsoluteLocation location)
write in interface StorageWriteServicepublic void remove(AbsoluteLocation location)
remove in interface StorageRemoveServicepublic boolean objectExists(AbsoluteLocation location)
objectExists in interface StorageCheckServiceCopyright © 2019. All rights reserved.