Package org.yamcs.yarch
Class FileSystemBucketDatabase
java.lang.Object
org.yamcs.yarch.FileSystemBucketDatabase
- All Implemented Interfaces:
BucketDatabase
BucketDatabase
implementation that maps objects to files on a file system.-
Constructor Summary
ConstructorDescriptionFileSystemBucketDatabase
(String yamcsInstance) FileSystemBucketDatabase
(String yamcsInstance, Map<String, Object> args) -
Method Summary
Modifier and TypeMethodDescriptioncreateBucket
(String bucketName) void
deleteBucket
(String bucketName) Retrieve a bucket handler from the database.registerBucket
(String bucketName, Path location) Manually register a bucket based on a location on the file system.
-
Constructor Details
-
FileSystemBucketDatabase
- Throws:
IOException
-
FileSystemBucketDatabase
- Throws:
IOException
-
-
Method Details
-
createBucket
- Specified by:
createBucket
in interfaceBucketDatabase
- Throws:
IOException
-
registerBucket
Manually register a bucket based on a location on the file system.It is not necessary to register buckets that exist in the standard location (directly under under dataDir).
Remark that bucket registration is transient.
- Parameters:
bucketName
- the name of the bucket.location
- the path to the bucket. This location should already exist.- Throws:
IOException
-
getBucket
Description copied from interface:BucketDatabase
Retrieve a bucket handler from the database.- Specified by:
getBucket
in interfaceBucketDatabase
- Returns:
- the bucket with the given name or null if it does not exist
- Throws:
IOException
-
listBuckets
- Specified by:
listBuckets
in interfaceBucketDatabase
- Throws:
IOException
-
deleteBucket
- Specified by:
deleteBucket
in interfaceBucketDatabase
- Throws:
IOException
-
getRootPath
-