1 21 22 package org.apache.derby.impl.store.raw.data; 23 24 import org.apache.derby.impl.store.raw.data.BasePage; 25 26 import org.apache.derby.iapi.services.sanity.SanityManager; 27 import org.apache.derby.iapi.services.io.FormatIdUtil; 28 import org.apache.derby.iapi.services.io.StoredFormatIds; 29 30 import org.apache.derby.iapi.error.StandardException; 31 32 import org.apache.derby.iapi.store.raw.Page; 33 import org.apache.derby.iapi.store.raw.Transaction; 34 35 import org.apache.derby.iapi.store.raw.log.LogInstant; 36 37 import java.io.OutputStream ; 38 import java.io.ObjectOutput ; 39 import java.io.ObjectInput ; 40 import java.io.IOException ; 41 import org.apache.derby.iapi.services.io.LimitObjectInput; 42 43 60 public final class InvalidatePageOperation extends PhysicalPageOperation 61 { 62 public InvalidatePageOperation(BasePage page) 63 { 64 super(page); 65 } 66 67 70 71 public InvalidatePageOperation() { super(); } 73 74 75 82 public void writeExternal(ObjectOutput out) throws IOException 83 { 84 super.writeExternal(out); 86 } 87 88 93 public void readExternal(ObjectInput in) 94 throws IOException , ClassNotFoundException 95 { 96 super.readExternal(in); 97 } 98 99 102 public int getTypeFormatId() { 103 return StoredFormatIds.LOGOP_INVALIDATE_PAGE; 104 } 105 106 109 117 public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) 118 throws StandardException, IOException 119 { 120 this.page.setPageStatus(instant, BasePage.INVALID_PAGE); 121 } 122 123 126 127 135 public void undoMe(Transaction xact, BasePage undoPage, LogInstant CLRInstant, 136 LimitObjectInput in) 137 throws StandardException, IOException 138 { 139 undoPage.setPageStatus(CLRInstant, BasePage.VALID_PAGE); 140 } 141 142 143 146 147 154 public void restoreMe(Transaction xact, BasePage undoPage, 155 LogInstant CLRInstant, LimitObjectInput in) 156 throws StandardException, IOException 157 { 158 undoMe(xact, undoPage, CLRInstant, in); 159 } 160 161 public String toString() 162 { 163 if (SanityManager.DEBUG) 164 return super.toString() + "Invalidate Page - it has been deallocated"; 165 else 166 return null; 167 } 168 169 } 170 | Popular Tags |