1 21 22 package org.apache.derby.iapi.store.raw; 23 24 import org.apache.derby.iapi.store.access.SpaceInfo; 25 import org.apache.derby.iapi.error.StandardException; 26 27 import java.util.Properties ; 28 29 114 115 public interface ContainerHandle 116 { 117 118 121 public static final int DEFAULT_PAGESIZE = -1; 122 123 public static final int DEFAULT_SPARESPACE = -1; 124 125 public static final int DEFAULT_ASSIGN_ID = 0; 126 127 130 public static final int MODE_DEFAULT = 0x00000000; 131 public static final int MODE_UNLOGGED = 0x00000001; 132 public static final int MODE_CREATE_UNLOGGED = 0x00000002; 133 public static final int MODE_FORUPDATE = 0x00000004; 134 public static final int MODE_READONLY = 0x00000008; 135 public static final int MODE_TRUNCATE_ON_COMMIT = 0x00000010; 136 public static final int MODE_DROP_ON_COMMIT = 0x00000020; 137 public static final int MODE_OPEN_FOR_LOCK_ONLY = 0x00000040; 138 public static final int MODE_LOCK_NOWAIT = 0x00000080; 139 public static final int MODE_TRUNCATE_ON_ROLLBACK = 0x00000100; public static final int MODE_FLUSH_ON_COMMIT = 0x00000200; public static final int MODE_NO_ACTIONS_ON_COMMIT = 0x00000400; public static final int MODE_TEMP_IS_KEPT = 0x00000800; 144 public static final int MODE_USE_UPDATE_LOCKS = 0x00001000; public static final int MODE_SECONDARY_LOCKED = 0x00002000; public static final int MODE_BASEROW_INSERT_LOCKED = 0x00004000; 148 public static final int TEMPORARY_SEGMENT = -1; 149 150 151 154 public static final long FIRST_PAGE_NUMBER = 1; 155 156 159 public static final long INVALID_PAGE_NUMBER = -1; 160 161 164 public ContainerKey getId(); 165 166 171 public Object getUniqueId(); 172 173 178 boolean isReadOnly(); 179 180 195 public Page addPage() throws StandardException; 196 197 198 207 public void compressContainer() throws StandardException; 208 209 214 public long getReusableRecordIdSequenceNumber() throws StandardException; 215 216 235 public Page addPage(int flag) throws StandardException; 236 public static final int ADD_PAGE_DEFAULT = 0x1; 237 public static final int ADD_PAGE_BULK = 0x2; 238 239 240 243 public void preAllocate(int numPage); 244 245 246 274 public void removePage(Page page) throws StandardException; 275 276 277 293 public Page getPage(long pageNumber) 294 throws StandardException; 295 296 306 public Page getPageNoWait(long pageNumber) throws StandardException; 307 308 329 public Page getUserPageNoWait(long pageNumber) throws StandardException; 330 351 public Page getUserPageWait(long pageNumber) throws StandardException; 352 353 374 public Page getFirstPage() throws StandardException; 375 376 417 public Page getNextPage(long prevNum) throws StandardException; 418 419 420 435 public Page getPageForInsert(int flag) 436 throws StandardException; 437 438 public Page getPageForCompress( 439 int flag, 440 long pageno) 441 throws StandardException; 442 443 public static final int GET_PAGE_UNFILLED = 0x1; 454 455 456 484 void getContainerProperties(Properties prop) 485 throws StandardException; 486 487 506 public void close(); 507 508 511 512 519 public long getEstimatedRowCount(int flag) throws StandardException; 520 521 534 public void setEstimatedRowCount(long count, int flag) throws StandardException; 535 536 545 public long getEstimatedPageCount(int flag) throws StandardException; 546 547 548 554 public void flushContainer() throws StandardException; 555 556 559 public LockingPolicy getLockingPolicy(); 560 561 564 public void setLockingPolicy(LockingPolicy newLockingPolicy); 565 566 577 public RecordHandle makeRecordHandle(long pageNumber, int recordId) 578 throws StandardException; 579 580 581 588 public void compactRecord(RecordHandle record) throws StandardException; 589 590 594 public boolean isTemporaryContainer() throws StandardException; 595 596 599 public SpaceInfo getSpaceInfo() throws StandardException; 600 601 605 public void backupContainer(String backupContainerPath) throws StandardException; 606 } 607 | Popular Tags |