Package org.yamcs.yarch
Interface Bucket
- All Known Implementing Classes:
FileSystemBucket
,RdbBucket
public interface Bucket
-
Method Summary
Modifier and TypeMethodDescriptionvoid
deleteObject
(String objectName) findObject
(String objectName) retrieve the object properties or null if not such an object existgetName()
This bucket's namebyte[]
Retrieve object from the bucket.default List<Tablespace.ObjectProperties>
default List<Tablespace.ObjectProperties>
listObjects
(String prefix) 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>
void
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
-
getName
String getName()This bucket's name -
getProperties
- Throws:
IOException
-
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
-
listObjects
- Throws:
IOException
-
listObjects
- 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
Retrieve object from the bucket. Returns null if object does not exist.- Parameters:
objectName
-- Returns:
- Throws:
IOException
-
deleteObject
- Throws:
IOException
-
findObject
retrieve the object properties or null if not such an object exist- Parameters:
objectName
-- Returns:
- Throws:
IOException
-