1 21 22 package org.apache.derby.iapi.store.access; 23 24 import java.util.Properties ; 25 26 import java.io.Serializable ; 27 28 import org.apache.derby.iapi.services.context.ContextManager; 29 import org.apache.derby.iapi.services.property.PersistentSet; 30 import org.apache.derby.iapi.services.io.Storable; 31 32 import org.apache.derby.iapi.error.StandardException; 33 34 import org.apache.derby.iapi.store.raw.Loggable; 35 import org.apache.derby.iapi.store.raw.Transaction; 36 37 import org.apache.derby.iapi.types.DataValueDescriptor; 38 39 import org.apache.derby.iapi.store.access.BackingStoreHashtable; 40 import org.apache.derby.iapi.services.io.FormatableBitSet; 41 42 import org.apache.derby.iapi.store.access.DatabaseInstant; 43 import org.apache.derby.iapi.error.ExceptionSeverity; 44 79 80 public interface TransactionController 81 extends PersistentSet 82 { 83 84 90 static final int MODE_RECORD = 6; 91 98 static final int MODE_TABLE = 7; 99 100 104 105 118 static final int ISOLATION_NOLOCK = 0; 119 120 135 static final int ISOLATION_READ_UNCOMMITTED = 1; 136 137 144 static final int ISOLATION_READ_COMMITTED = 2; 145 146 154 static final int ISOLATION_READ_COMMITTED_NOHOLDLOCK = 3; 155 156 166 static final int ISOLATION_REPEATABLE_READ = 4; 167 168 174 static final int ISOLATION_SERIALIZABLE = 5; 175 176 185 186 201 static final int OPENMODE_USE_UPDATE_LOCKS = 0x00001000; 202 203 212 static final int OPENMODE_SECONDARY_LOCKED = 0x00002000; 213 214 224 static final int OPENMODE_BASEROW_INSERT_LOCKED = 0x00004000; 225 226 229 static final int OPENMODE_FORUPDATE = 0x00000004; 230 231 237 static final int OPENMODE_FOR_LOCK_ONLY = 0x00000040; 238 239 248 static final int OPENMODE_LOCK_NOWAIT = 0x00000080; 249 250 253 public static final int OPEN_CONGLOMERATE = 0x01; 254 public static final int OPEN_SCAN = 0x02; 255 public static final int OPEN_CREATED_SORTS = 0x03; 256 public static final int OPEN_SORT = 0x04; 257 public static final int OPEN_TOTAL = 0x05; 258 259 260 static final byte IS_DEFAULT = (byte) 0x00; static final byte IS_TEMPORARY = (byte) 0x01; static final byte IS_KEPT = (byte) 0x02; 264 265 269 270 280 boolean conglomerateExists(long conglomId) 281 throws StandardException; 282 283 407 long createConglomerate( 408 String implementation, 409 DataValueDescriptor[] template, 410 ColumnOrdering[] columnOrder, 411 Properties properties, 412 int temporaryFlag) 413 throws StandardException; 414 415 446 long createAndLoadConglomerate( 447 String implementation, 448 DataValueDescriptor[] template, 449 ColumnOrdering[] columnOrder, 450 Properties properties, 451 int temporaryFlag, 452 RowLocationRetRowSource rowSource, 453 long[] rowCount) 454 throws StandardException; 455 456 525 long recreateAndLoadConglomerate( 526 String implementation, 527 boolean recreate_ifempty, 528 DataValueDescriptor[] template, 529 ColumnOrdering[] columnOrder, 530 Properties properties, 531 int temporaryFlag, 532 long orig_conglomId, 533 RowLocationRetRowSource rowSource, 534 long[] rowCount 535 ) 536 throws StandardException; 537 538 566 public void addColumnToConglomerate( 567 long conglomId, 568 int column_id, 569 Storable template_column) 570 throws StandardException; 571 572 573 583 void dropConglomerate(long conglomId) 584 throws StandardException; 585 586 594 long findConglomid(long containerid) 595 throws StandardException; 596 597 608 long findContainerid(long conglomid) 609 throws StandardException; 610 611 671 public TransactionController startNestedUserTransaction(boolean readOnly) 672 throws StandardException; 673 674 701 Properties getUserCreateConglomPropList(); 702 703 737 ConglomerateController openConglomerate( 738 long conglomId, 739 boolean hold, 740 int open_mode, 741 int lock_level, 742 int isolation_level) 743 throws StandardException; 744 745 778 ConglomerateController openCompiledConglomerate( 779 boolean hold, 780 int open_mode, 781 int lock_level, 782 int isolation_level, 783 StaticCompiledOpenConglomInfo static_info, 784 DynamicCompiledOpenConglomInfo dynamic_info) 785 throws StandardException; 786 787 788 850 BackingStoreHashtable createBackingStoreHashtableFromScan( 851 long conglomId, 852 int open_mode, 853 int lock_level, 854 int isolation_level, 855 FormatableBitSet scanColumnList, 856 DataValueDescriptor[] startKeyValue, 857 int startSearchOperator, 858 Qualifier qualifier[][], 859 DataValueDescriptor[] stopKeyValue, 860 int stopSearchOperator, 861 long max_rowcnt, 862 int[] key_column_numbers, 863 boolean remove_duplicates, 864 long estimated_rowcnt, 865 long max_inmemory_rowcnt, 866 int initialCapacity, 867 float loadFactor, 868 boolean collect_runtimestats, 869 boolean skipNullKeyColumns) 870 throws StandardException; 871 872 873 1083 ScanController openScan( 1084 long conglomId, 1085 boolean hold, 1086 int open_mode, 1087 int lock_level, 1088 int isolation_level, 1089 FormatableBitSet scanColumnList, 1090 DataValueDescriptor[] startKeyValue, 1091 int startSearchOperator, 1092 Qualifier qualifier[][], 1093 DataValueDescriptor[] stopKeyValue, 1094 int stopSearchOperator) 1095 throws StandardException; 1096 1097 1098 1133 ScanController openCompiledScan( 1134 boolean hold, 1135 int open_mode, 1136 int lock_level, 1137 int isolation_level, 1138 FormatableBitSet scanColumnList, 1139 DataValueDescriptor[] startKeyValue, 1140 int startSearchOperator, 1141 Qualifier qualifier[][], 1142 DataValueDescriptor[] stopKeyValue, 1143 int stopSearchOperator, 1144 StaticCompiledOpenConglomInfo static_info, 1145 DynamicCompiledOpenConglomInfo dynamic_info) 1146 throws StandardException; 1147 1148 1149 1175 GroupFetchScanController openGroupFetchScan( 1176 long conglomId, 1177 boolean hold, 1178 int open_mode, 1179 int lock_level, 1180 int isolation_level, 1181 FormatableBitSet scanColumnList, 1182 DataValueDescriptor[] startKeyValue, 1183 int startSearchOperator, 1184 Qualifier qualifier[][], 1185 DataValueDescriptor[] stopKeyValue, 1186 int stopSearchOperator) 1187 throws StandardException; 1188 1189 1225 GroupFetchScanController defragmentConglomerate( 1226 long conglomId, 1227 boolean online, 1228 boolean hold, 1229 int open_mode, 1230 int lock_level, 1231 int isolation_level) 1232 throws StandardException; 1233 1234 1245 void purgeConglomerate(long conglomId) 1246 throws StandardException; 1247 1248 1260 void compressConglomerate(long conglomId) 1261 throws StandardException; 1262 1263 1264 1316 boolean fetchMaxOnBtree( 1317 long conglomId, 1318 int open_mode, 1319 int lock_level, 1320 int isolation_level, 1321 FormatableBitSet scanColumnList, 1322 DataValueDescriptor[] fetchRow) 1323 throws StandardException; 1324 1325 1326 1342 StoreCostController openStoreCost( 1343 long conglomId) 1344 throws StandardException; 1345 1346 1347 1389 public int countOpens(int which_to_count) 1390 throws StandardException; 1391 1392 1393 1406 public String debugOpened() throws StandardException; 1407 1408 1409 1412 public FileResource getFileHandler(); 1413 1414 1419 public Object getLockObject(); 1420 1421 1440 public StaticCompiledOpenConglomInfo getStaticCompiledConglomInfo( 1441 long conglomId) 1442 throws StandardException; 1443 1444 1462 public DynamicCompiledOpenConglomInfo getDynamicCompiledConglomInfo( 1463 long conglomId) 1464 throws StandardException; 1465 1466 1470 1471 1474 public long[] getCacheStats(String cacheName); 1475 1476 1479 public void resetCacheStats(String cacheName); 1480 1481 1482 1486 1500 public void logAndDo(Loggable operation) throws StandardException; 1501 1502 1503 1507 1508 1593 long createSort( 1594 Properties implParameters, 1595 DataValueDescriptor[] template, 1596 ColumnOrdering columnOrdering[], 1597 SortObserver sortObserver, 1598 boolean alreadyInOrder, 1599 long estimatedRows, 1600 int estimatedRowSize) 1601 throws StandardException; 1602 1615 void dropSort(long sortid) throws StandardException; 1616 1617 1634 1635 SortController openSort(long id) 1636 throws StandardException; 1637 1638 1654 SortCostController openSortCostController( 1655 Properties implParameters) 1656 throws StandardException; 1657 1658 1669 RowLocationRetRowSource openSortRowSource(long id) 1670 throws StandardException; 1671 1672 1698 1699 ScanController openSortScan( 1700 long id, 1701 boolean hold) 1702 throws StandardException; 1703 1704 1705 1709 1710 1714 public boolean anyoneBlocked(); 1715 1716 1725 public void abort() 1726 throws StandardException; 1727 1728 1741 public void commit() 1742 throws StandardException; 1743 1744 1780 public DatabaseInstant commitNoSync(int commitflag) 1781 throws StandardException; 1782 1783 public final int RELEASE_LOCKS = 0x1; 1784 public final int KEEP_LOCKS = 0x2; 1785 public final int READONLY_TRANSACTION_INITIALIZATION = 0x4; 1786 1787 1790 public void destroy(); 1791 1792 1799 public ContextManager getContextManager(); 1800 1801 1814 public String getTransactionIdString(); 1815 1816 1823 public String getActiveStateTxIdString(); 1824 1825 1826 1831 boolean isIdle(); 1832 1833 1844 boolean isGlobal(); 1845 1846 1852 boolean isPristine(); 1853 1854 1871 public int releaseSavePoint(String name, Object kindOfSavepoint) throws StandardException; 1872 1873 1904 public int rollbackToSavePoint( 1905 String name, 1906 boolean close_controllers, Object kindOfSavepoint) 1907 throws StandardException; 1908 1909 1910 1928 public int setSavePoint(String name, Object kindOfSavepoint) throws StandardException; 1929 1930 1956 Object createXATransactionFromLocalTransaction( 1957 int format_id, 1958 byte[] global_id, 1959 byte[] branch_id) 1960 throws StandardException; 1961 1962} 1963 | Popular Tags |