Package org.yamcs.yarch
Interface Bucket
-
- All Known Implementing Classes:
FileSystemBucket,RdbBucket
public interface Bucket
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddeleteObject(String objectName)Tablespace.ObjectPropertiesfindObject(String objectName)retrieve the object properties or null if not such an object existStringgetName()get the bucket namebyte[]getObject(String objectName)Retrieve object from the bucket.default List<Tablespace.ObjectProperties>listObjects()default List<Tablespace.ObjectProperties>listObjects(String prefix)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 prefixdefault List<Tablespace.ObjectProperties>listObjects(Predicate<Tablespace.ObjectPropertiesOrBuilder> p)voidputObject(String objectName, String contentType, Map<String,String> metadata, byte[] objectData)
-
-
-
Method Detail
-
getName
String getName()
get the bucket name- Returns:
-
listObjects
default List<Tablespace.ObjectProperties> listObjects() throws IOException
- Throws:
IOException
-
listObjects
default List<Tablespace.ObjectProperties> listObjects(String prefix) throws IOException
- Throws:
IOException
-
listObjects
default List<Tablespace.ObjectProperties> listObjects(Predicate<Tablespace.ObjectPropertiesOrBuilder> p) throws IOException
- Throws:
IOException
-
listObjects
List<Tablespace.ObjectProperties> listObjects(String prefix, Predicate<Tablespace.ObjectPropertiesOrBuilder> p) throws IOException
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
- Throws:
IOException
-
putObject
void putObject(String objectName, String contentType, Map<String,String> metadata, byte[] objectData) throws IOException
- Throws:
IOException
-
getObject
byte[] getObject(String objectName) throws IOException
Retrieve object from the bucket. Returns null if object does not exist.- Parameters:
objectName-- Returns:
- Throws:
IOException
-
deleteObject
void deleteObject(String objectName) throws IOException
- Throws:
IOException
-
findObject
Tablespace.ObjectProperties findObject(String objectName) throws IOException
retrieve the object properties or null if not such an object exist- Parameters:
objectName-- Returns:
- Throws:
IOException
-
-