public interface FileSystem
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BLOCK_EXTENSION |
Modifier and Type | Method and Description |
---|---|
Block |
loadBlock(java.lang.String blockPath)
Retrieves a
Block instance, given its path on disk. |
Metadata |
loadMetadata(java.lang.String blockPath)
|
java.lang.String |
storeBlock(Block block)
Stores a
Block at the specified path on disk. |
void |
storeMetadata(Metadata metadata,
java.lang.String blockPath)
Stores a
Metadata at the specified location. |
static final java.lang.String BLOCK_EXTENSION
Block loadBlock(java.lang.String blockPath) throws java.io.IOException, SerializationException
Block
instance, given its path on disk.blockPath
- the physical (on-disk) location of the Block to load.java.io.IOException
SerializationException
Metadata loadMetadata(java.lang.String blockPath) throws java.io.IOException, SerializationException
blockPath
- the physical location of the Block to load metadata
from.java.io.IOException
SerializationException
java.lang.String storeBlock(Block block) throws FileSystemException, java.io.IOException
Block
at the specified path on disk.block
- the Block instance to persist to disk.FileSystemException
java.io.IOException
void storeMetadata(Metadata metadata, java.lang.String blockPath) throws FileSystemException, java.io.IOException
Metadata
at the specified location. Metadata
can flow to disk at memory capacity or during shutdown.metadata
- the Metadata
to 'store,' which may
just involve
updating index structures.blockPath
- the on-disk path of the Block the Metadata being stored
belongs to.FileSystemException
java.io.IOException