Package org.yamcs.buckets
Interface Bucket
- All Known Implementing Classes:
FileSystemBucket
,RdbBucket
,RemoteYamcsBucket
public interface Bucket
-
Method Summary
Modifier and TypeMethodDescriptiondeleteObjectAsync
(String objectName) findObjectAsync
(String objectName) Retrieve the object properties or null if not such an object existBucket locationgetName()
This bucket's nameCompletableFuture<byte[]>
getObjectAsync
(String objectName) Retrieve object from the bucket.default CompletableFuture<List<ObjectProperties>>
default CompletableFuture<List<ObjectProperties>>
listObjectsAsync
(String prefix) listObjectsAsync
(String prefix, Predicate<ObjectProperties> p) retrieve objects whose name start with prefix and that match the condition Note that searching by prefix is cheap, the condition will be evaluated for all objects that match the prefixdefault CompletableFuture<List<ObjectProperties>>
putObjectAsync
(String objectName, String contentType, Map<String, String> metadata, byte[] objectData) void
setMaxObjects
(int maxObjects) Update the object count limit for this bucket.void
setMaxSize
(long maxSize) Update the size limit for this bucket.
-
Method Details
-
getLocation
BucketLocation getLocation()Bucket location -
getName
String getName()This bucket's name -
getPropertiesAsync
CompletableFuture<BucketProperties> getPropertiesAsync() -
setMaxSize
Update the size limit for this bucket.If the specified size is smaller than the current size, the bucket will no longer accept new files.
- Throws:
IOException
-
setMaxObjects
Update the object count limit for this bucket.If the specified count is smaller than the current count, the bucket will no longer accept new files.
- Throws:
IOException
-
listObjectsAsync
-
listObjectsAsync
-
listObjectsAsync
-
listObjectsAsync
CompletableFuture<List<ObjectProperties>> listObjectsAsync(String prefix, Predicate<ObjectProperties> p) retrieve objects whose name start with prefix and that match the condition Note that searching by prefix is cheap, the condition will be evaluated for all objects that match the prefix- Parameters:
prefix
-p
- predicate to be matched by the returned objects- Returns:
- list of objects
-
putObjectAsync
-
getObjectAsync
Retrieve object from the bucket. Returns null if object does not exist. -
deleteObjectAsync
-
findObjectAsync
Retrieve the object properties or null if not such an object exist
-