1 21 22 package org.apache.derby.iapi.store.raw; 23 24 import org.apache.derby.iapi.services.daemon.DaemonService; 25 import org.apache.derby.iapi.services.context.ContextManager; 26 import org.apache.derby.iapi.services.locks.LockFactory; 27 28 import org.apache.derby.iapi.services.property.PersistentSet; 29 30 import org.apache.derby.iapi.store.access.TransactionInfo; 31 import org.apache.derby.iapi.store.raw.xact.TransactionFactory; 32 import org.apache.derby.iapi.store.raw.log.LogInstant; 33 import org.apache.derby.iapi.error.StandardException; 34 35 import org.apache.derby.catalog.UUID; 36 import org.apache.derby.iapi.store.access.DatabaseInstant; 37 import org.apache.derby.iapi.error.ExceptionSeverity; 38 import java.util.Properties ; 39 import java.io.Serializable ; 40 import java.io.File ; 41 42 94 95 96 public interface RawStoreFactory extends Corruptable { 97 98 101 102 103 public static final int DERBY_STORE_MINOR_VERSION_1 = 1; 104 105 106 public static final int DERBY_STORE_MINOR_VERSION_2 = 2; 107 108 109 public static final int DERBY_STORE_MAJOR_VERSION_10 = 10; 110 111 114 public static final int PAGE_SIZE_DEFAULT = 4096; 115 116 119 public static final int PAGE_SIZE_MINIMUM = 1024; 120 121 122 public static final String PAGE_SIZE_STRING = "2048"; 123 124 125 128 public static final String PAGE_CACHE_SIZE_PARAMETER = 129 "derby.storage.pageCacheSize"; 130 131 134 public static final int PAGE_CACHE_SIZE_DEFAULT = 1000; 135 136 139 public static final int PAGE_CACHE_SIZE_MINIMUM = 40; 140 141 144 public static final int PAGE_CACHE_SIZE_MAXIMUM = Integer.MAX_VALUE; 145 146 149 public static final short MAX_CONTAINER_INITIAL_PAGES = 1000; 150 151 155 public static final String MINIMUM_RECORD_SIZE_PARAMETER = 156 "derby.storage.minimumRecordSize"; 157 164 public static final int MINIMUM_RECORD_SIZE_DEFAULT = 12; 165 166 169 public static final int MINIMUM_RECORD_SIZE_MINIMUM = 1; 170 171 173 public static final String PAGE_RESERVED_SPACE_PARAMETER = 174 "derby.storage.pageReservedSpace"; 175 176 public static final String PAGE_RESERVED_ZERO_SPACE_STRING = "0"; 177 178 181 public static final String PRE_ALLOCATE_PAGE = 182 "derby.storage.pagePerAllocate"; 183 184 185 193 public static final String PAGE_REUSABLE_RECORD_ID = 194 "derby.storage.reusableRecordId"; 195 196 200 public static final String STREAM_FILE_BUFFER_SIZE_PARAMETER = 201 "derby.storage.streamFileBufferSize"; 202 203 206 public static final int STREAM_FILE_BUFFER_SIZE_DEFAULT = 16384; 207 208 211 public static final int STREAM_FILE_BUFFER_SIZE_MINIMUM = 1024; 212 213 216 public static final int STREAM_FILE_BUFFER_SIZE_MAXIMUM = 217 Integer.MAX_VALUE; 218 219 236 public static final String CONTAINER_INITIAL_PAGES = 237 "derby.storage.initialPages"; 238 239 242 public static final int ENCRYPTION_ALIGNMENT = 8; 243 244 250 public static final int DEFAULT_ENCRYPTION_BLOCKSIZE = 8; 251 252 257 public static final String ENCRYPTION_BLOCKSIZE = "derby.encryptionBlockSize"; 258 259 266 public static final String DATA_ENCRYPT_ALGORITHM_VERSION="data_encrypt_algorithm_version"; 267 268 273 public static final String LOG_ENCRYPT_ALGORITHM_VERSION="log_encrypt_algorithm_version"; 274 275 281 public static final String ENCRYPTED_KEY = 282 "encryptedBootPassword"; 283 284 285 292 public static final String OLD_ENCRYPTED_KEY = 293 "OldEncryptedBootPassword"; 294 295 296 302 public static final String DB_ENCRYPTION_STATUS = 303 "derby.storage.databaseEncryptionStatus"; 304 305 309 public static final int DB_ENCRYPTION_IN_PROGRESS = 1; 310 311 314 public static final int DB_ENCRYPTION_IN_UNDO = 2; 315 316 319 public static final int DB_ENCRYPTION_IN_CLEANUP = 3; 320 321 322 327 String CRYPTO_OLD_EXTERNAL_KEY_VERIFY_FILE = "verifyOldKey.dat"; 328 329 330 331 334 public static final String KEEP_TRANSACTION_LOG = 335 "derby.storage.keepTransactionLog"; 336 337 348 public static final String PATCH_INITPAGE_RECOVER_ERROR = 349 "derby.storage.patchInitPageRecoverError"; 350 351 352 353 public static final String MODULE = 354 "org.apache.derby.iapi.store.raw.RawStoreFactory"; 355 356 359 public boolean isReadOnly(); 360 361 364 public LockFactory getLockFactory(); 365 366 367 415 416 public Transaction startTransaction( 417 ContextManager contextMgr, 418 String transName) 419 throws StandardException; 420 421 476 public Transaction startGlobalTransaction( 477 ContextManager contextMgr, 478 int format_id, 479 byte[] global_id, 480 byte[] local_id) 481 throws StandardException; 482 483 484 499 public Transaction findUserTransaction( 500 ContextManager contextMgr, 501 String transName) throws StandardException; 502 503 504 554 public Transaction startInternalTransaction(ContextManager contextMgr) throws StandardException; 555 556 609 610 public Transaction startNestedReadOnlyUserTransaction( 611 Object compatibilitySpace, 612 ContextManager contextMgr, 613 String transName) 614 throws StandardException; 615 616 668 669 public Transaction startNestedUpdateUserTransaction( 670 ContextManager contextMgr, 671 String transName) 672 throws StandardException; 673 674 675 678 public TransactionInfo[] getTransactionInfo(); 679 680 686 public void freeze() throws StandardException; 687 688 694 public void unfreeze() throws StandardException; 695 696 707 public void backup( 708 String backupDir, 709 boolean wait) throws StandardException; 710 711 712 732 public void backupAndEnableLogArchiveMode( 733 String backupDir, 734 boolean deleteOnlineArchivedLogFiles, 735 boolean wait) 736 throws StandardException; 737 738 751 public void disableLogArchiveMode(boolean deleteOnlineArchivedLogFiles) 752 throws StandardException; 753 754 755 762 public void checkpoint() throws StandardException; 763 764 765 770 public void idle() throws StandardException; 771 772 778 ScanHandle openFlushedScan(DatabaseInstant start, int groupsIWant) 779 throws StandardException; 780 781 782 786 public DaemonService getDaemon(); 787 788 789 792 public String getTransactionFactoryModule(); 793 794 797 public String getDataFactoryModule(); 798 799 802 public String getLogFactoryModule(); 803 804 810 public Object getXAResourceManager() 811 throws StandardException; 812 813 817 public void createFinished() throws StandardException; 818 819 824 public void getRawStoreProperties(PersistentSet tc) 825 throws StandardException; 826 827 830 831 836 public void freezePersistentStore() throws StandardException; 837 838 843 public void unfreezePersistentStore() throws StandardException; 844 845 851 public int encrypt(byte[] cleartext, int offset, int length, 852 byte[] ciphertext, int outputOffset, 853 boolean newEngine) 854 throws StandardException ; 855 856 862 public int decrypt(byte[] ciphertext, int offset, int length, 863 byte[] cleartext, int outputOffset) 864 throws StandardException ; 865 866 869 public int getEncryptionBlockSize(); 870 871 875 public int random(); 876 877 883 public Serializable changeBootPassword(Properties properties, Serializable changePassword) 884 throws StandardException ; 885 886 899 long getMaxContainerId() 900 throws StandardException; 901 902 903 906 public TransactionFactory getXactFactory(); 907 } 908 | Popular Tags |