StoreNewChunk() public method

public StoreNewChunk ( byte fromArray, int startingAt, int length ) : long
fromArray byte
startingAt int
length int
return long
Beispiel #1
0
 public byte[] this[string key]
 {
     set
     {
         long storage = m_archive.StoreNewChunk(value, 0, value.Length);
         //this.FreeChunksOnAbort.Add(storage);
         m_freeChunksOnAbort[storage] = storage;
         long valueFound;
         if (m_tree.ContainsKey(key, out valueFound))
         {
             //this.archive.ReleaseBuffers(valueFound);
             if (m_freeChunksOnAbort.ContainsKey(valueFound))
             {
                 // free it now
                 m_freeChunksOnAbort.Remove(valueFound);
                 m_archive.ReleaseBuffers(valueFound);
             }
             else
             {
                 // release at commit.
                 m_freeChunksOnCommit[valueFound] = valueFound;
             }
         }
         m_tree[key] = storage;
     }
     get
     {
         long map = m_tree[key];
         return(m_archive.GetChunk(map));
     }
 }