Package org.yamcs.yarch.rocksdb
Class RdbBucket
- java.lang.Object
-
- org.yamcs.yarch.rocksdb.RdbBucket
-
-
Constructor Summary
Constructors Constructor Description RdbBucket(String yamcsInstance, Tablespace tablespace, int tbsIndex, Tablespace.BucketProperties bucketProps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteObject(String objectName)
Tablespace.ObjectProperties
findObject(String objectName)
retrieve the object properties or null if not such an object existString
getName()
get the bucket namebyte[]
getObject(String objectName)
Retrieve object from the bucket.int
getTbsIndex()
List<Tablespace.ObjectProperties>
listObjects(String prefix, Predicate<Tablespace.ObjectPropertiesOrBuilder> 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 prefixvoid
putObject(String objectName, String contentType, Map<String,String> metadata, byte[] objectData)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.yarch.Bucket
listObjects, listObjects, listObjects
-
-
-
-
Constructor Detail
-
RdbBucket
public RdbBucket(String yamcsInstance, Tablespace tablespace, int tbsIndex, Tablespace.BucketProperties bucketProps) throws IOException
- Throws:
IOException
-
-
Method Detail
-
listObjects
public List<Tablespace.ObjectProperties> listObjects(String prefix, Predicate<Tablespace.ObjectPropertiesOrBuilder> p) throws IOException
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:
listObjects
in interfaceBucket
p
- predicate to be matched by the returned objects- Returns:
- list of objects
- Throws:
IOException
-
putObject
public void putObject(String objectName, String contentType, Map<String,String> metadata, byte[] objectData) throws IOException
- Specified by:
putObject
in interfaceBucket
- Throws:
IOException
-
findObject
public Tablespace.ObjectProperties findObject(String objectName) throws IOException
Description copied from interface:Bucket
retrieve the object properties or null if not such an object exist- Specified by:
findObject
in interfaceBucket
- Returns:
- Throws:
IOException
-
getObject
public byte[] getObject(String objectName) throws IOException
Description copied from interface:Bucket
Retrieve object from the bucket. Returns null if object does not exist.- Specified by:
getObject
in interfaceBucket
- Returns:
- Throws:
IOException
-
deleteObject
public void deleteObject(String objectName) throws IOException
- Specified by:
deleteObject
in interfaceBucket
- Throws:
IOException
-
getTbsIndex
public int getTbsIndex()
-
-