1 21 22 package org.apache.derby.impl.store.raw.data; 23 24 import org.apache.derby.impl.store.raw.data.AllocationActions; 25 import org.apache.derby.impl.store.raw.data.BasePage; 26 27 import org.apache.derby.iapi.services.sanity.SanityManager; 28 import org.apache.derby.iapi.services.io.FormatIdUtil; 29 30 import org.apache.derby.iapi.store.raw.Loggable; 31 import org.apache.derby.iapi.store.raw.xact.RawTransaction; 32 import org.apache.derby.iapi.store.raw.log.LogInstant; 33 34 import org.apache.derby.iapi.error.StandardException; 35 36 public class LoggableAllocActions implements AllocationActions { 37 38 51 public void actionAllocatePage(RawTransaction t, BasePage allocPage, 52 long pageNumber, int doStatus, int undoStatus) 53 throws StandardException 54 { 55 Loggable lop = new AllocPageOperation((AllocPage)allocPage, pageNumber, doStatus, undoStatus); 56 57 allocPage.preDirty(); 61 62 t.logAndDo(lop); 63 } 64 65 76 public void actionChainAllocPage(RawTransaction t, BasePage allocPage, 77 long pageNumber, long pageOffset) 78 throws StandardException 79 { 80 Loggable lop = new ChainAllocPageOperation((AllocPage)allocPage, pageNumber, pageOffset); 81 82 allocPage.preDirty(); 86 87 t.logAndDo(lop); 88 } 89 90 115 public void actionCompressSpaceOperation( 116 RawTransaction t, 117 BasePage allocPage, 118 int new_highest_page, 119 int num_pages_truncated) 120 throws StandardException 121 { 122 Loggable lop = 123 new CompressSpacePageOperation( 124 (AllocPage)allocPage, new_highest_page, num_pages_truncated); 125 allocPage.preDirty(); 126 127 t.logAndDo(lop); 128 } 129 } 130 | Popular Tags |