Class BlockMgrFactory


  • public class BlockMgrFactory
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean AddTracker  
    • Constructor Summary

      Constructors 
      Constructor Description
      BlockMgrFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BlockMgr addCache​(BlockMgr blockMgr, int readBlockCacheSize, int writeBlockCacheSize)
      Add a caching layer to a BlockMgr.
      static BlockMgr addCache​(BlockMgr blockMgr, FileSet fileSet, FileMode fileMode, int readBlockCacheSize, int writeBlockCacheSize)
      Add a caching layer to a BlockMgr if appropriate.
      static BlockMgr create​(FileSet fileSet, java.lang.String ext, int blockSize, int readBlockCacheSize, int writeBlockCacheSize)  
      static BlockMgr create​(FileSet fileSet, java.lang.String ext, BlockParams params)  
      static BlockMgr create​(FileSet fileSet, java.lang.String ext, FileMode fileMode, int blockSize, int readBlockCacheSize, int writeBlockCacheSize)  
      static BlockMgr createFile​(java.lang.String filename, BlockParams params)
      Create a BlockMgr backed by a real file
      static BlockMgr createFile​(java.lang.String filename, FileMode fileMode, int blockSize, int readBlockCacheSize, int writeBlockCacheSize)
      Create a BlockMgr backed by a real file
      static BlockMgr createMem​(java.lang.String indexName, int blockSize)
      Create an in-memory block manager
      static BlockMgr createMMapFile​(java.lang.String filename, int blockSize)
      Create a NIO Block Manager
      static BlockMgr createStdFile​(java.lang.String filename, int blockSize, int readBlockCacheSize, int writeBlockCacheSize)
      Create a Block Manager using direct access (and a cache)
      static BlockMgr createStdFileNoCache​(java.lang.String filename, int blockSize)
      Create a Block Manager using direct access, no caching, no nothing.
      static BlockMgr tracker​(BlockMgr blockMgr)  
      • Methods inherited from class java.lang.Object

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

      • AddTracker

        public static boolean AddTracker
    • Constructor Detail

      • BlockMgrFactory

        public BlockMgrFactory()
    • Method Detail

      • create

        public static BlockMgr create​(FileSet fileSet,
                                      java.lang.String ext,
                                      int blockSize,
                                      int readBlockCacheSize,
                                      int writeBlockCacheSize)
      • create

        public static BlockMgr create​(FileSet fileSet,
                                      java.lang.String ext,
                                      FileMode fileMode,
                                      int blockSize,
                                      int readBlockCacheSize,
                                      int writeBlockCacheSize)
      • createMem

        public static BlockMgr createMem​(java.lang.String indexName,
                                         int blockSize)
        Create an in-memory block manager
      • createFile

        public static BlockMgr createFile​(java.lang.String filename,
                                          BlockParams params)
        Create a BlockMgr backed by a real file
      • createFile

        public static BlockMgr createFile​(java.lang.String filename,
                                          FileMode fileMode,
                                          int blockSize,
                                          int readBlockCacheSize,
                                          int writeBlockCacheSize)
        Create a BlockMgr backed by a real file
      • createMMapFile

        public static BlockMgr createMMapFile​(java.lang.String filename,
                                              int blockSize)
        Create a NIO Block Manager
      • createStdFile

        public static BlockMgr createStdFile​(java.lang.String filename,
                                             int blockSize,
                                             int readBlockCacheSize,
                                             int writeBlockCacheSize)
        Create a Block Manager using direct access (and a cache)
      • createStdFileNoCache

        public static BlockMgr createStdFileNoCache​(java.lang.String filename,
                                                    int blockSize)
        Create a Block Manager using direct access, no caching, no nothing.
      • addCache

        public static BlockMgr addCache​(BlockMgr blockMgr,
                                        int readBlockCacheSize,
                                        int writeBlockCacheSize)
        Add a caching layer to a BlockMgr.

        This does not make sense for memory BlockMgr or for memory mapper files. This function always add the cache.

        See Also:
        addCache(BlockMgr, FileSet, FileMode, int, int)
      • addCache

        public static BlockMgr addCache​(BlockMgr blockMgr,
                                        FileSet fileSet,
                                        FileMode fileMode,
                                        int readBlockCacheSize,
                                        int writeBlockCacheSize)
        Add a caching layer to a BlockMgr if appropriate. This does not make sense for memory BlockMgr or for memory mapper files. These are skipped.