public static PageCorruption <KEY, VALUE> SetPointer <KEY, VALUE>(GBPTreePointerType pointerType, long pointer) { return((cursor, layout, node, treeState) => { OverwriteGSPP(cursor, pointerType.Offset(node), treeState.stableGeneration(), pointer); }); }
public static PageCorruption <KEY, VALUE> Broken <KEY, VALUE>(GBPTreePointerType gbpTreePointerType) { return((pageCursor, layout, node, treeState) => { int offset = gbpTreePointerType.Offset(node); pageCursor.Offset = offset; pageCursor.putInt(int.MaxValue); }); }
/* PageCorruption */ public static PageCorruption <KEY, VALUE> Crashed <KEY, VALUE>(GBPTreePointerType gbpTreePointerType) { return((pageCursor, layout, node, treeState) => { int offset = gbpTreePointerType.Offset(node); long stableGeneration = treeState.stableGeneration(); long unstableGeneration = treeState.unstableGeneration(); long crashGeneration = crashGeneration(treeState); pageCursor.Offset = offset; long pointer = pointer(GenerationSafePointerPair.Read(pageCursor, stableGeneration, unstableGeneration, NO_GENERATION_TARGET)); OverwriteGSPP(pageCursor, offset, crashGeneration, pointer); }); }