Package org.yamcs.buckets
Class RemoteYamcsBucket
java.lang.Object
org.yamcs.buckets.RemoteYamcsBucket
- All Implemented Interfaces:
Bucket
-
Field Summary
-
Constructor Summary
-
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.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 prefixputObjectAsync
(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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.yamcs.buckets.Bucket
listObjectsAsync, listObjectsAsync, listObjectsAsync
-
Field Details
-
LOCATION
-
-
Constructor Details
-
RemoteYamcsBucket
-
-
Method Details
-
getLocation
Description copied from interface:Bucket
Bucket location- Specified by:
getLocation
in interfaceBucket
-
getName
Description copied from interface:Bucket
This bucket's name -
getPropertiesAsync
- Specified by:
getPropertiesAsync
in interfaceBucket
-
setMaxSize
Description copied from interface:Bucket
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.
- Specified by:
setMaxSize
in interfaceBucket
- Throws:
IOException
-
setMaxObjects
Description copied from interface:Bucket
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.
- Specified by:
setMaxObjects
in interfaceBucket
- Throws:
IOException
-
listObjectsAsync
public CompletableFuture<List<ObjectProperties>> listObjectsAsync(String prefix, Predicate<ObjectProperties> p) Description copied from interface:Bucket
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- Specified by:
listObjectsAsync
in interfaceBucket
p
- predicate to be matched by the returned objects- Returns:
- list of objects
-
putObjectAsync
public CompletableFuture<Void> putObjectAsync(String objectName, String contentType, Map<String, String> metadata, byte[] objectData) - Specified by:
putObjectAsync
in interfaceBucket
-
getObjectAsync
Description copied from interface:Bucket
Retrieve object from the bucket. Returns null if object does not exist.- Specified by:
getObjectAsync
in interfaceBucket
-
deleteObjectAsync
- Specified by:
deleteObjectAsync
in interfaceBucket
-
findObjectAsync
Description copied from interface:Bucket
Retrieve the object properties or null if not such an object exist- Specified by:
findObjectAsync
in interfaceBucket
-