Example #1
0
        internal static DB_LSN getDB_LSN(LSN inp)
        {
            if (inp == null)
            {
                return(null);
            }

            DB_LSN ret = new DB_LSN();

            ret.file   = inp.LogFileNumber;
            ret.offset = inp.Offset;
            return(ret);
        }
Example #2
0
        /// <summary>
        /// Compare two LSNs.
        /// </summary>
        /// <param name="lsn1">The first LSN to compare</param>
        /// <param name="lsn2">The second LSN to compare</param>
        /// <returns>
        /// 0 if they are equal, 1 if lsn1 is greater than lsn2, and -1 if lsn1
        /// is less than lsn2.
        /// </returns>
        public static int Compare(LSN lsn1, LSN lsn2)
        {
            DB_LSN a = new DB_LSN();

            a.offset = lsn1.Offset;
            a.file   = lsn1.LogFileNumber;

            DB_LSN b = new DB_LSN();

            b.offset = lsn2.Offset;
            b.file   = lsn2.LogFileNumber;

            return(libdb_csharp.log_compare(a, b));
        }
Example #3
0
 log_compare(DB_LSN* lsn0, DB_LSN* lsn1);
Example #4
0
 internal LSN(DB_LSN dblsn)
 {
     LogFileNumber = dblsn.file;
     Offset        = dblsn.offset;
 }
Example #5
0
 public Lsn(DB_LSN lsn)
 {
     this.lsn = lsn;
 }