Class FileSystemDataStore
java.lang.Object
org.moeaframework.analysis.store.fs.FileSystemDataStore
- All Implemented Interfaces:
DataStore
Data store backed by the local file system. A
FileMap
determines the layout of the containers and blobs.
Unless otherwise specified, HashFileMap
is used.-
Constructor Summary
ConstructorDescriptionFileSystemDataStore
(File root) Constructs a default file system data store at the specified directory.FileSystemDataStore
(File root, FileMap fileMap) Constructs a file system data store at the specified directory.FileSystemDataStore
(File root, Schema schema) Constructs a default file system data store at the specified directory.FileSystemDataStore
(Path root, FileMap fileMap, Schema schema) Constructs a hierarchical file system data store at the specified directory. -
Method Summary
Modifier and TypeMethodDescriptiongetContainer
(Reference key) Returns the container for the given reference.getRoot()
Returns the root directory for this data store.Returns the schema used by this file store.Returns a list of all containers in this data store.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.analysis.store.DataStore
getContainer
-
Constructor Details
-
FileSystemDataStore
Constructs a default file system data store at the specified directory.- Parameters:
root
- the root directory- Throws:
IOException
- if an I/O error occurredManifestValidationException
- if the existing manifest failed validation
-
FileSystemDataStore
Constructs a default file system data store at the specified directory.- Parameters:
root
- the root directoryschema
- the schema defining the structure of the data store- Throws:
IOException
- if an I/O error occurredManifestValidationException
- if the existing manifest failed validation
-
FileSystemDataStore
Constructs a file system data store at the specified directory.- Parameters:
root
- the root directoryfileMap
- the file map that determines the layout of files- Throws:
IOException
- if an I/O error occurredManifestValidationException
- if the existing manifest failed validation
-
FileSystemDataStore
Constructs a hierarchical file system data store at the specified directory.- Parameters:
root
- the root directoryfileMap
- the file map that determines the layout of filesschema
- the schema defining the structure of the data store- Throws:
IOException
- if an I/O error occurredManifestValidationException
- if the existing manifest failed validation
-
-
Method Details
-
getSchema
Returns the schema used by this file store.- Returns:
- the schema
-
getRoot
Returns the root directory for this data store.- Returns:
- the root directory
-
getContainer
Description copied from interface:DataStore
Returns the container for the given reference. A container is always returned, though this does not imply the underlying storage exists or has been provisioned.- Specified by:
getContainer
in interfaceDataStore
- Parameters:
key
- the data reference- Returns:
- the container
-
listContainers
Description copied from interface:DataStore
Returns a list of all containers in this data store.- Specified by:
listContainers
in interfaceDataStore
- Returns:
- a list of containers
- Throws:
IOException
- if an I/O error occurred
-