public class OffheapFileSystem extends Object implements FileSystem
| Constructor and Description |
|---|
OffheapFileSystem(PageSource source) |
OffheapFileSystem(PageSource source,
int blockSize,
int maxDataPageSize,
int concurrency) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes the off heap file system with its directories and files and frees up the memory.
|
void |
deleteDirectory(String name)
Deletes a particular directory.
|
boolean |
directoryExists(String name)
Checks if a directory exists in the file system
|
Directory |
getOrCreateDirectory(String name)
Creates a new, empty directory or returns a reference to the named directory if it already exists.
|
Set<String> |
listDirectories()
Returns a listing of all directory names present in the system.
|
public OffheapFileSystem(PageSource source)
public OffheapFileSystem(PageSource source, int blockSize, int maxDataPageSize, int concurrency)
public Directory getOrCreateDirectory(String name) throws IOException
FileSystemgetOrCreateDirectory in interface FileSystemname - name of the directory to be created.IOException - if an I/O error occurs.public Set<String> listDirectories() throws IOException
FileSystemlistDirectories in interface FileSystemIOException - if an I/O error occurs.public void deleteDirectory(String name) throws IOException, FileNotFoundException
FileSystemdeleteDirectory in interface FileSystemname - of the directory to be deletedIOException - if an I/O error occurs.FileNotFoundException - if the directory does not exist.public void delete()
throws IOException
FileSystemdelete in interface FileSystemIOException - if an I/O error occurs.public boolean directoryExists(String name) throws IOException
FileSystemdirectoryExists in interface FileSystemname - of the directory to check for existenceIOException - if an I/O error occurs.Copyright © 2015–2024. All rights reserved.