Chunked singly linked file with garbage collection.
Beispiel #1
0
        public static BplusTreeBytes ReOpen(System.IO.Stream treefile, System.IO.Stream blockfile)
        {
            BplusTreeLong tree    = BplusTreeLong.SetupFromExistingStream(treefile);
            LinkedFile    archive = LinkedFile.SetupFromExistingStream(blockfile);

            return(new BplusTreeBytes(tree, archive));
        }
Beispiel #2
0
 public static LinkedFile SetupFromExistingStream(System.IO.Stream fromfile, long StartSeek)
 {
     LinkedFile result = new LinkedFile(100, StartSeek); // dummy buffer size for now
     result.fromfile = fromfile;
     result.readHeader();
     result.buffers = BufferFile.SetupFromExistingStream(fromfile, StartSeek+result.headersize);
     return result;
 }
Beispiel #3
0
        public static BplusTreeBytes Initialize(System.IO.Stream treefile, System.IO.Stream blockfile, int KeyLength, int CultureId,
                                                int nodesize, int buffersize)
        {
            BplusTreeLong tree    = BplusTreeLong.InitializeInStream(treefile, KeyLength, nodesize, CultureId);
            LinkedFile    archive = LinkedFile.InitializeLinkedFileInStream(blockfile, buffersize);

            return(new BplusTreeBytes(tree, archive));
        }
Beispiel #4
0
        public static LinkedFile SetupFromExistingStream(System.IO.Stream fromfile, long StartSeek)
        {
            LinkedFile result = new LinkedFile(100, StartSeek);             // dummy buffer size for now

            result.fromfile = fromfile;
            result.readHeader();
            result.buffers = BufferFile.SetupFromExistingStream(fromfile, StartSeek + result.headersize);
            return(result);
        }
Beispiel #5
0
 public static LinkedFile InitializeLinkedFileInStream(System.IO.Stream fromfile, int buffersize, long StartSeek)
 {
     LinkedFile result = new LinkedFile(buffersize, StartSeek);
     result.fromfile = fromfile;
     result.setHeader();
     // buffersize should be increased by overhead...
     result.buffers = BufferFile.InitializeBufferFileInStream(fromfile, buffersize+BUFFEROVERHEAD, StartSeek+result.headersize);
     return result;
 }
Beispiel #6
0
        public static LinkedFile InitializeLinkedFileInStream(System.IO.Stream fromfile, int buffersize, long StartSeek)
        {
            LinkedFile result = new LinkedFile(buffersize, StartSeek);

            result.fromfile = fromfile;
            result.setHeader();
            // buffersize should be increased by overhead...
            result.buffers = BufferFile.InitializeBufferFileInStream(fromfile, buffersize + BUFFEROVERHEAD, StartSeek + result.headersize);
            return(result);
        }
Beispiel #7
0
 public BplusTreeBytes(BplusTreeLong tree, LinkedFile archive)
 {
     this.tree    = tree;
     this.archive = archive;
 }
Beispiel #8
0
		public BplusTreeBytes(BplusTreeLong tree, LinkedFile archive)
		{
			this.tree = tree;
			this.archive = archive;
		}
Beispiel #9
0
 public BplusTreeBytes(BplusTreeLong tree, LinkedFile archive)
 {
     m_tree = tree;
     m_archive = archive;
 }
Beispiel #10
0
 public BplusTreeBytes(BplusTreeLong tree, LinkedFile archive)
 {
     m_tree    = tree;
     m_archive = archive;
 }