예제 #1
0
        protected FixedSizeCollection(DataFile data, int recordSize)
        {
            if (recordSize <= 0)
                throw new ArgumentException();

            this.data = data;
            this.recordSize = recordSize;
            keyPositionCache = new MemoryCache(513, 750, 15);
        }
예제 #2
0
 public PathRootTable(DataFile data)
 {
     dictionary = new StringDictionary(data);
 }
예제 #3
0
 public DataFileStream(DataFile file)
     : this(file, FileAccess.ReadWrite)
 {
 }
예제 #4
0
 public DataFileStream(DataFile file, FileAccess access)
 {
     this.file = file;
     this.access = access;
 }
예제 #5
0
 /// <summary>
 /// Copies the contents of the current file, from the current position,
 /// to the given destination file, starting at its current position,
 /// for a given amount of bytes.
 /// </summary>
 /// <param name="destFile">The destination file where to copy the contents
 /// of the current one.</param>
 /// <param name="size">The amount of data, in bytes, to copy to the
 /// destination file.</param>
 /// <remarks>
 /// If the current file contains less amount of data than the specified
 /// amount to copy, or the amount of data left after the current position
 /// is less than the given amount to copy, only the data available will be
 /// copied to the destination file.
 /// <para>
 /// The destination file must not be the same file, source of the copy:
 /// this method cannot be used to copy data within the same file.
 /// </para>
 /// <para>
 /// The first aim of this function is to provide an efficient way of
 /// merging data between different <see cref="ITransaction">transactions</see>.
 /// </para>
 /// <para>
 /// When this method returns, the position location in both the source and
 /// target files will point to the end of the copied sequence.
 /// </para>
 /// </remarks>
 public abstract void CopyTo(DataFile destFile, long size);
예제 #6
0
파일: DataFile.cs 프로젝트: ikvm/cloudb
 /// <summary>
 /// Copies the contents of the current file, from the current position,
 /// to the given destination file, starting at its current position,
 /// for a given amount of bytes.
 /// </summary>
 /// <param name="destFile">The destination file where to copy the contents
 /// of the current one.</param>
 /// <param name="size">The amount of data, in bytes, to copy to the 
 /// destination file.</param>
 /// <remarks>
 /// If the current file contains less amount of data than the specified
 /// amount to copy, or the amount of data left after the current position
 /// is less than the given amount to copy, only the data available will be 
 /// copied to the destination file.
 /// <para>
 /// The destination file must not be the same file, source of the copy:
 /// this method cannot be used to copy data within the same file.
 /// </para>
 /// <para>
 /// The first aim of this function is to provide an efficient way of
 /// merging data between different <see cref="ITransaction">transactions</see>.
 /// </para>
 /// <para>
 /// When this method returns, the position location in both the source and
 /// target files will point to the end of the copied sequence.
 /// </para>
 /// </remarks>
 public abstract void CopyTo(DataFile destFile, long size);
예제 #7
0
 public BlockServerTable(DataFile data)
     : base(data, 16)
 {
 }