Class GridFilesystem


  • public class GridFilesystem
    extends java.lang.Object
    Entry point for GridFile and GridInputStream / GridOutputStream
    Author:
    Bela Ban
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • data

        protected final ReplCache<java.lang.String,​byte[]> data
      • 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 -
    • 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)