Package org.yamcs.yarch.rocksdb
Class RdbBucket
java.lang.Object
org.yamcs.buckets.Bucket
org.yamcs.yarch.rocksdb.RdbBucket
-
Nested Class Summary
Nested classes/interfaces inherited from class org.yamcs.buckets.Bucket
Bucket.AccessRuleType -
Constructor Summary
ConstructorsConstructorDescriptionRdbBucket(String yamcsInstance, Tablespace tablespace, int tbsIndex, Tablespace.BucketProperties bucketProps) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteObject(String objectName) deleteObjectAsync(String objectName) findObject(String objectName) findObjectAsync(String objectName) Retrieve the object properties or null if not such an object existBucket locationgetName()This bucket's namebyte[]CompletableFuture<byte[]>getObjectAsync(String objectName) Retrieve object from the bucket.intlistObjects(String prefix, Predicate<ObjectProperties> p) 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 prefixvoidputObjectAsync(String objectName, String contentType, Map<String, String> metadata, byte[] objectData) voidsetMaxObjects(int maxObjects) Update the object count limit for this bucket.voidsetMaxSize(long maxSize) Update the size limit for this bucket.Methods inherited from class org.yamcs.buckets.Bucket
getAccessRules, hasAccessRules, listObjectsAsync, listObjectsAsync, listObjectsAsync, setAccessRules
-
Constructor Details
-
RdbBucket
public RdbBucket(String yamcsInstance, Tablespace tablespace, int tbsIndex, Tablespace.BucketProperties bucketProps)
-
-
Method Details
-
getLocation
Description copied from class:BucketBucket location- Specified by:
getLocationin classBucket
-
getPropertiesAsync
- Specified by:
getPropertiesAsyncin classBucket
-
getProperties
-
setMaxSize
Description copied from class:BucketUpdate 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:
setMaxSizein classBucket- Throws:
IOException
-
setMaxObjects
Description copied from class:BucketUpdate 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:
setMaxObjectsin classBucket- Throws:
IOException
-
listObjectsAsync
public CompletableFuture<List<ObjectProperties>> listObjectsAsync(String prefix, Predicate<ObjectProperties> p) Description copied from class:Bucketretrieve 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:
listObjectsAsyncin classBucketp- predicate to be matched by the returned objects- Returns:
- list of objects
-
listObjects
public List<ObjectProperties> listObjects(String prefix, Predicate<ObjectProperties> p) throws IOException - Throws:
IOException
-
putObjectAsync
public CompletableFuture<Void> putObjectAsync(String objectName, String contentType, Map<String, String> metadata, byte[] objectData) - Specified by:
putObjectAsyncin classBucket
-
putObject
public void putObject(String objectName, String contentType, Map<String, String> metadata, byte[] objectData) throws IOException- Throws:
IOException
-
findObjectAsync
Description copied from class:BucketRetrieve the object properties or null if not such an object exist- Specified by:
findObjectAsyncin classBucket
-
findObject
- Throws:
IOException
-
getObjectAsync
Description copied from class:BucketRetrieve object from the bucket. Returns null if object does not exist.- Specified by:
getObjectAsyncin classBucket
-
getObject
- Throws:
IOException
-
deleteObjectAsync
- Specified by:
deleteObjectAsyncin classBucket
-
deleteObject
- Throws:
IOException
-
getName
Description copied from class:BucketThis bucket's name -
getTablespace
-
getTbsIndex
public int getTbsIndex()
-