Package org.jgroups.blocks
Class GridFilesystem
- java.lang.Object
-
- org.jgroups.blocks.GridFilesystem
-
public class GridFilesystem extends java.lang.Object
Entry point for GridFile and GridInputStream / GridOutputStream- Author:
- Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description protected ReplCache<java.lang.String,byte[]>
data
protected int
default_chunk_size
protected short
default_repl_count
protected ReplCache<java.lang.String,GridFile.Metadata>
metadata
-
Constructor Summary
Constructors Constructor Description GridFilesystem(ReplCache<java.lang.String,byte[]> data, ReplCache<java.lang.String,GridFile.Metadata> metadata)
GridFilesystem(ReplCache<java.lang.String,byte[]> data, ReplCache<java.lang.String,GridFile.Metadata> metadata, short default_repl_count, int default_chunk_size)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getFile(java.io.File parent, java.lang.String child)
java.io.File
getFile(java.io.File parent, java.lang.String child, int chunk_size)
java.io.File
getFile(java.lang.String pathname)
java.io.File
getFile(java.lang.String pathname, int chunk_size)
java.io.File
getFile(java.lang.String parent, java.lang.String child)
java.io.File
getFile(java.lang.String parent, java.lang.String child, int chunk_size)
java.io.InputStream
getInput(java.io.File pathname)
java.io.InputStream
getInput(java.lang.String pathname)
java.io.OutputStream
getOutput(java.lang.String pathname)
java.io.OutputStream
getOutput(java.lang.String pathname, boolean append)
java.io.OutputStream
getOutput(java.lang.String pathname, boolean append, short repl_count, int chunk_size)
java.io.OutputStream
getOutput(GridFile file)
void
remove(java.lang.String path, boolean synchronous)
-
-
-
Field Detail
-
data
protected final ReplCache<java.lang.String,byte[]> data
-
metadata
protected final ReplCache<java.lang.String,GridFile.Metadata> metadata
-
default_chunk_size
protected final int default_chunk_size
-
default_repl_count
protected final short default_repl_count
-
-
Constructor Detail
-
GridFilesystem
public GridFilesystem(ReplCache<java.lang.String,byte[]> data, ReplCache<java.lang.String,GridFile.Metadata> metadata, short default_repl_count, int default_chunk_size)
Creates an instance. The data and metadata caches should already have been setup and started- Parameters:
data
-metadata
-default_chunk_size
-
-
GridFilesystem
public GridFilesystem(ReplCache<java.lang.String,byte[]> data, ReplCache<java.lang.String,GridFile.Metadata> metadata)
-
-
Method Detail
-
getFile
public java.io.File getFile(java.lang.String pathname)
-
getFile
public java.io.File getFile(java.lang.String pathname, int chunk_size)
-
getFile
public java.io.File getFile(java.lang.String parent, java.lang.String child)
-
getFile
public java.io.File getFile(java.lang.String parent, java.lang.String child, int chunk_size)
-
getFile
public java.io.File getFile(java.io.File parent, java.lang.String child)
-
getFile
public java.io.File getFile(java.io.File parent, java.lang.String child, int chunk_size)
-
getOutput
public java.io.OutputStream getOutput(java.lang.String pathname) throws java.io.IOException
- Throws:
java.io.IOException
-
getOutput
public java.io.OutputStream getOutput(java.lang.String pathname, boolean append) throws java.io.IOException
- Throws:
java.io.IOException
-
getOutput
public java.io.OutputStream getOutput(java.lang.String pathname, boolean append, short repl_count, int chunk_size) throws java.io.IOException
- Throws:
java.io.IOException
-
getOutput
public java.io.OutputStream getOutput(GridFile file) throws java.io.IOException
- Throws:
java.io.IOException
-
getInput
public java.io.InputStream getInput(java.lang.String pathname) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
getInput
public java.io.InputStream getInput(java.io.File pathname) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
remove
public void remove(java.lang.String path, boolean synchronous)
-
-