Exemple #1
0
        internal static void SetSuccessor(PageCursor cursor, long successorId, long stableGeneration, long unstableGeneration)
        {
            cursor.Offset = BytePosSuccessor;
            long result = GenerationSafePointerPair.Write(cursor, successorId, stableGeneration, unstableGeneration);

            GenerationSafePointerPair.AssertSuccess(result);
        }
Exemple #2
0
        internal static void SetLeftSibling(PageCursor cursor, long leftSiblingId, long stableGeneration, long unstableGeneration)
        {
            cursor.Offset = BytePosLeftsibling;
            long result = GenerationSafePointerPair.Write(cursor, leftSiblingId, stableGeneration, unstableGeneration);

            GenerationSafePointerPair.AssertSuccess(result);
        }
Exemple #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldWrite()
        public virtual void ShouldWrite()
        {
            // GIVEN
            _cursor.Offset = SLOT_A_OFFSET;
            long preStatePointerA = StateA.materialize(_cursor, POINTER_A);

            _cursor.Offset = _slotBOffset;
            long preStatePointerB = StateB.materialize(_cursor, POINTER_B);

            // WHEN
            _cursor.Offset = GSPP_OFFSET;
            long written = GenerationSafePointerPair.Write(_cursor, WRITTEN_POINTER, STABLE_GENERATION, UNSTABLE_GENERATION);

            // THEN
            ExpectedWriteOutcome.verifyWrite(_cursor, written, StateA, StateB, preStatePointerA, preStatePointerB);
        }
Exemple #4
0
        internal static void WriteChild(PageCursor cursor, long child, long stableGeneration, long unstableGeneration)
        {
            long write = GenerationSafePointerPair.Write(cursor, child, stableGeneration, unstableGeneration);

            GenerationSafePointerPair.AssertSuccess(write);
        }