Class BucketStore
-
- All Implemented Interfaces:
public class BucketStoreStores buckets and their metadata created in S3Mock. API Reference
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringBUCKET_META_FILE
-
Constructor Summary
Constructors Constructor Description BucketStore(File rootFolder, DateTimeFormatter s3ObjectDateFormat, String region, ObjectMapper objectMapper)
-
Method Summary
-
-
Constructor Detail
-
BucketStore
BucketStore(File rootFolder, DateTimeFormatter s3ObjectDateFormat, String region, ObjectMapper objectMapper)
-
-
Method Detail
-
listBuckets
final List<BucketMetadata> listBuckets()
-
getBucketMetadata
final BucketMetadata getBucketMetadata(String bucketName)
-
addKeyToBucket
final UUID addKeyToBucket(String key, String bucketName)
-
lookupIdsInBucket
final List<UUID> lookupIdsInBucket(String prefix, String bucketName)
-
lookupKeysInBucket
final List<String> lookupKeysInBucket(String prefix, String bucketName)
-
removeFromBucket
final Boolean removeFromBucket(String key, String bucketName)
-
createBucket
final BucketMetadata createBucket(String bucketName, Boolean objectLockEnabled, ObjectOwnership objectOwnership, String bucketRegion, BucketInfo bucketInfo, LocationInfo locationInfo)
-
doesBucketExist
final Boolean doesBucketExist(String bucketName)
Checks if the specified bucket exists. Amazon S3 buckets are named in a global namespace; use this method to determine if a specified bucket name already exists, and therefore can't be used to create a new bucket.
-
isObjectLockEnabled
final Boolean isObjectLockEnabled(String bucketName)
-
storeObjectLockConfiguration
final Unit storeObjectLockConfiguration(BucketMetadata metadata, ObjectLockConfiguration configuration)
-
storeVersioningConfiguration
final Unit storeVersioningConfiguration(BucketMetadata metadata, VersioningConfiguration configuration)
-
storeBucketLifecycleConfiguration
final Unit storeBucketLifecycleConfiguration(BucketMetadata metadata, BucketLifecycleConfiguration configuration)
-
isBucketEmpty
final Boolean isBucketEmpty(String bucketName)
-
deleteBucket
final Boolean deleteBucket(String bucketName)
-
loadBuckets
final List<UUID> loadBuckets(List<String> bucketNames)
Used to load metadata for all buckets when S3Mock starts.
-
-
-
-