示例#1
0
 internal static UserData Create(OneDInt32 table, long rowid)
 {
     UserData ud;
     ud.table = table;
     ud.rowid = rowid;
     return ud;
 }
 public UserIDRange(int minID, int maxID)
 {
     this.minID = minID;
     this.maxID = maxID;
     usertotableindex = new OneDInt32(maxID - minID + 1);
     /* Now 0 (default) is treated as -1.
     for (int i = 0; i != usertotableindex.Length; i++)
     {
         usertotableindex[i] = -1;
     }
      * */
 }
示例#3
0
 internal static bool DoesUserFit(OneDInt32 table, long rowid, IList<Int32> friends)
 {
     return rowid + 1 + 1 + friends.Count <= table.LongLength;
 }
示例#4
0
 public void SetUserTableSize(long tablesize)
 {
     if (tablesize <= 0)
     {
         throw new Exception("Invalid table size: " + tablesize.ToString());
     }
     table = new OneDInt32(tablesize / 4 + ((0 == (tablesize % 4)) ? 0 : 1));
 }