1 21 22 package org.apache.derby.iapi.store.raw.data; 23 24 import org.apache.derby.iapi.store.raw.ContainerKey; 25 26 import org.apache.derby.iapi.services.daemon.Serviceable; 27 import org.apache.derby.iapi.services.context.ContextManager; 28 29 import org.apache.derby.iapi.error.StandardException; 30 import org.apache.derby.iapi.store.raw.ContainerHandle; 31 import org.apache.derby.iapi.store.raw.Corruptable; 32 import org.apache.derby.iapi.store.raw.LockingPolicy; 33 import org.apache.derby.iapi.store.raw.RawStoreFactory; 34 import org.apache.derby.iapi.store.raw.RecordHandle; 35 import org.apache.derby.iapi.store.raw.StreamContainerHandle; 36 import org.apache.derby.iapi.store.raw.xact.RawTransaction; 37 import org.apache.derby.iapi.store.raw.Transaction; 38 import org.apache.derby.io.StorageFactory; 39 import org.apache.derby.iapi.store.access.FileResource; 40 import org.apache.derby.iapi.store.access.RowSource; 41 import org.apache.derby.iapi.store.raw.log.LogInstant; 42 import org.apache.derby.iapi.util.ByteArray; 43 import org.apache.derby.catalog.UUID; 44 45 import java.util.Properties ; 46 import java.io.File ; 47 48 public interface DataFactory extends Corruptable { 49 50 public static final String MODULE = "org.apache.derby.iapi.store.raw.data.DataFactory"; 51 52 55 public static final String TEMP_SEGMENT_NAME = "tmp"; 56 57 60 public static final String DB_LOCKFILE_NAME = "db.lck"; 61 62 65 public static final String DB_EX_LOCKFILE_NAME = "dbex.lck"; 66 67 70 public boolean isReadOnly(); 71 72 73 86 public ContainerHandle openContainer(RawTransaction t, 87 ContainerKey containerId, 88 LockingPolicy locking, 89 int mode) 90 throws StandardException; 91 92 99 public RawContainerHandle openDroppedContainer(RawTransaction t, 100 ContainerKey containerId, 101 LockingPolicy locking, 102 int mode) 103 throws StandardException; 104 105 121 public long addContainer( 122 RawTransaction t, 123 long segmentId, 124 long containerid, 125 int mode, 126 Properties tableProperties, 127 int temporaryFlag) 128 throws StandardException; 129 130 144 public long addAndLoadStreamContainer(RawTransaction t, long segmentId, 145 Properties tableProperties, RowSource rowSource) 146 throws StandardException; 147 148 156 public StreamContainerHandle openStreamContainer( 157 RawTransaction t, 158 long segmentId, 159 long containerId, 160 boolean hold) 161 throws StandardException; 162 163 168 public void dropStreamContainer(RawTransaction t, long segmentId, long containerId) 169 throws StandardException; 170 171 179 public void reCreateContainerForRedoRecovery(RawTransaction t, 180 long segmentId, long containerId, ByteArray containerInfo) 181 throws StandardException; 182 183 184 public void dropContainer(RawTransaction t, ContainerKey containerId) 185 throws StandardException; 186 187 public void checkpoint() throws StandardException; 188 189 public void idle() throws StandardException; 190 191 196 public UUID getIdentifier(); 197 198 204 public void setRawStoreFactory(RawStoreFactory rsf, boolean create, 205 Properties properties) 206 throws StandardException ; 207 208 221 224 229 public void createFinished() throws StandardException; 230 231 234 public FileResource getFileHandler(); 235 236 240 public void removeStubsOK(); 241 242 245 public long[] getCacheStats(String cacheName); 246 247 250 public void resetCacheStats(String cacheName); 251 252 256 public int reclaimSpace(Serviceable work, ContextManager contextMgr) 257 throws StandardException; 258 259 264 public void postRecovery() throws StandardException; 265 266 272 public int encrypt(byte[] cleartext, int offset, int length, 273 byte[] ciphertext, int outputOffset, 274 boolean newEngine) 275 throws StandardException ; 276 277 283 public int decrypt(byte[] ciphertext, int offset, int length, 284 byte[] cleartext, int outputOffset) 285 throws StandardException ; 286 287 292 public void encryptAllContainers(RawTransaction t) 293 throws StandardException; 294 295 302 public void removeOldVersionOfContainers(boolean inRecovery) 303 throws StandardException; 304 305 308 public void setDatabaseEncrypted(); 309 310 314 public int getEncryptionBlockSize(); 315 316 320 public void freezePersistentStore() throws StandardException; 321 322 325 public void unfreezePersistentStore(); 326 327 332 public void writeInProgress() throws StandardException; 333 334 338 public void writeFinished(); 339 340 343 public void backupDataFiles(Transaction rt, File backupDir) throws StandardException; 344 345 358 long getMaxContainerId() 359 throws StandardException; 360 361 368 public void removeDroppedContainerFileStubs(LogInstant redoLWM) throws StandardException; 369 370 373 public StorageFactory getStorageFactory(); 374 375 public void stop(); 376 } 377 | Popular Tags |