1 21 22 package org.apache.derby.iapi.store.raw; 23 24 import org.apache.derby.iapi.services.io.FormatableBitSet; 25 26 import org.apache.derby.iapi.error.StandardException; 27 28 import org.apache.derby.iapi.store.access.conglomerate.LogicalUndo; 29 30 import org.apache.derby.iapi.store.access.Qualifier; 31 32 import org.apache.derby.iapi.types.DataValueDescriptor; 33 34 35 89 90 public interface Page 91 { 92 93 97 98 101 public static final int FIRST_SLOT_NUMBER = 0; 102 103 106 public static final int INVALID_SLOT_NUMBER = -1; 107 108 122 public long getPageNumber(); 123 124 130 131 139 public RecordHandle getInvalidRecordHandle(); 140 141 158 public RecordHandle makeRecordHandle(int recordHandleConstant) 159 throws StandardException; 160 161 175 RecordHandle getRecordHandle(int recordId); 176 177 195 boolean recordExists(RecordHandle handle, boolean ignoreDelete) 196 throws StandardException; 197 198 230 RecordHandle fetch( 231 RecordHandle handle, 232 Object [] row, 233 FormatableBitSet validColumns, 234 boolean forUpdate) 235 throws StandardException; 236 237 255 boolean spaceForInsert() 256 throws StandardException; 257 258 286 boolean spaceForInsert( 287 Object [] row, 288 FormatableBitSet validColumns, 289 int overflowThreshold) 290 throws StandardException; 291 292 314 RecordHandle insert( 315 Object [] row, 316 FormatableBitSet validColumns, 317 byte insertFlag, 318 int overflowThreshold) 319 throws StandardException; 320 321 349 boolean update( 350 RecordHandle handle, 351 Object [] row, 352 FormatableBitSet validColumns) 353 throws StandardException; 354 355 387 public boolean delete( 388 RecordHandle handle, 389 LogicalUndo undo) 390 throws StandardException; 391 392 435 public int moveRecordForCompressAtSlot( 436 int slot, 437 Object [] row, 438 RecordHandle[] old_handle, 439 RecordHandle[] new_handle) 440 throws StandardException; 441 442 461 public int fetchNumFields(RecordHandle handle) 462 throws StandardException; 463 464 470 471 472 490 int getSlotNumber(RecordHandle handle) 491 throws StandardException; 492 493 508 RecordHandle getRecordHandleAtSlot(int slot) 509 throws StandardException; 510 511 545 int getNextSlotNumber(RecordHandle handle) 546 throws StandardException; 547 548 605 RecordHandle insertAtSlot( 606 int slot, 607 Object [] row, 608 FormatableBitSet validColumns, 609 LogicalUndo undo, 610 byte insertFlag, 611 int overflowThreshold) 612 throws StandardException; 613 614 653 static final byte INSERT_INITIAL = (byte) 0x00; static final byte INSERT_DEFAULT = (byte) 0x01; static final byte INSERT_UNDO_WITH_PURGE = (byte) 0x02; static final byte INSERT_CONDITIONAL = (byte) 0x04; static final byte INSERT_OVERFLOW = (byte) 0x08; static final byte INSERT_FOR_SPLIT = (byte) 0x10; 662 663 736 public RecordHandle fetchFromSlot( 737 RecordHandle rh, 738 int slot, 739 Object [] row, 740 FetchDescriptor fetchDesc, 741 boolean ignoreDelete) 742 throws StandardException; 743 744 745 776 public RecordHandle fetchFieldFromSlot( 777 int slot, 778 int fieldId, 779 Object column) 780 throws StandardException; 781 782 800 public boolean isDeletedAtSlot(int slot) 801 throws StandardException; 802 803 846 public RecordHandle updateFieldAtSlot( 847 int slot, 848 int fieldId, 849 Object newValue, 850 LogicalUndo undo) 851 throws StandardException; 852 853 854 872 public int fetchNumFieldsAtSlot(int slot) 873 throws StandardException; 874 875 881 921 public RecordHandle deleteAtSlot( 922 int slot, 923 boolean delete, 924 LogicalUndo undo) 925 throws StandardException; 926 927 928 983 public void purgeAtSlot( 984 int slot, 985 int numpurges, 986 boolean needDataLogged) 987 throws StandardException; 988 989 990 1042 public void copyAndPurge( 1043 Page destPage, 1044 int src_slot, 1045 int num_rows, 1046 int dest_slot) 1047 throws StandardException; 1048 1049 1073 RecordHandle updateAtSlot( 1074 int slot, 1075 Object [] row, 1076 FormatableBitSet validColumns) 1077 throws StandardException; 1078 1079 1082 1083 1101 public void unlatch(); 1102 1103 1104 1105 1114 1115 public int recordCount() throws StandardException; 1116 1117 1125 1126 public int nonDeletedRecordCount() throws StandardException; 1127 1128 1157 public boolean shouldReclaimSpace( 1158 int num_non_deleted_rows, 1159 int slot_just_deleted) 1160 throws StandardException; 1161 1162 1173 public void setAuxObject(AuxObject aux); 1174 1175 1184 public AuxObject getAuxObject(); 1185 1186 1193 1194 1195 1198 1199 1205 void setTimeStamp(PageTimeStamp ts) throws StandardException; 1206 1207 1208 1213 PageTimeStamp currentTimeStamp(); 1214 1215 1227 boolean equalTimeStamp(PageTimeStamp ts) throws StandardException; 1228 1229 public boolean isLatched(); 1230 1231 public static final String DIAG_PAGE_SIZE = "pageSize"; 1232 public static final String DIAG_RESERVED_SPACE = "reserveSpace"; 1233 public static final String DIAG_MINIMUM_REC_SIZE = "minRecSize"; 1234 public static final String DIAG_BYTES_FREE = "bytesFree"; 1235 public static final String DIAG_BYTES_RESERVED = "bytesReserved"; 1236 public static final String DIAG_NUMOVERFLOWED = "numOverFlowed"; 1237 public static final String DIAG_ROWSIZE = "rowSize"; 1238 public static final String DIAG_MINROWSIZE = "minRowSize"; 1239 public static final String DIAG_MAXROWSIZE = "maxRowSize"; 1240 public static final String DIAG_PAGEOVERHEAD = "pageOverhead"; 1241 public static final String DIAG_SLOTTABLE_SIZE = "slotTableSize"; 1242} 1243 | Popular Tags |