1 21 22 package org.apache.derby.iapi.store.raw; 23 24 import org.apache.derby.iapi.services.daemon.Serviceable; 25 import org.apache.derby.iapi.error.StandardException; 26 import org.apache.derby.iapi.store.raw.log.LogInstant; 27 import org.apache.derby.iapi.store.access.FileResource; 28 import org.apache.derby.iapi.store.access.RowSource; 29 import org.apache.derby.iapi.store.access.TransactionController; 30 import org.apache.derby.iapi.services.context.ContextManager; 31 32 import java.util.Properties ; 33 34 import org.apache.derby.iapi.services.property.PersistentSet; 35 36 import org.apache.derby.iapi.error.ExceptionSeverity; 37 39 40 public interface Transaction { 41 42 45 public ContextManager getContextManager(); 46 47 58 Object getCompatibilitySpace(); 59 60 61 70 public void setup(PersistentSet set) 71 throws StandardException; 72 73 78 public GlobalTransactionId getGlobalId(); 79 80 94 95 public LockingPolicy getDefaultLockingPolicy(); 96 97 98 115 116 public LockingPolicy newLockingPolicy(int mode, int isolation, boolean stricterOk); 117 118 119 131 132 public void setDefaultLockingPolicy(LockingPolicy policy); 133 134 135 154 155 public LogInstant commit() throws StandardException; 156 157 178 179 public LogInstant commitNoSync(int commitflag) throws StandardException; 180 public final int RELEASE_LOCKS = TransactionController.RELEASE_LOCKS; 181 public final int KEEP_LOCKS = TransactionController.KEEP_LOCKS; 182 183 184 193 public void abort() throws StandardException; 194 195 208 public void close() throws StandardException; 209 210 221 public void destroy() throws StandardException; 222 223 224 244 245 public int setSavePoint(String name, Object kindOfSavepoint) throws StandardException; 246 247 265 266 public int releaseSavePoint(String name, Object kindOfSavepoint) throws StandardException; 267 268 288 public int rollbackToSavePoint(String name, Object kindOfSavepoint) throws StandardException; 289 290 309 public ContainerHandle openContainer(ContainerKey containerId, int mode) 310 throws StandardException; 311 312 331 332 public ContainerHandle openContainer( 333 ContainerKey containerId, 334 LockingPolicy locking, 335 int mode) 336 throws StandardException; 337 338 339 378 public long addContainer( 379 long segmentId, 380 long containerId, 381 int mode, 382 Properties tableProperties, 383 int temporaryFlag) 384 throws StandardException; 385 386 402 public void dropContainer(ContainerKey containerId) 403 throws StandardException; 404 405 425 public long addAndLoadStreamContainer( 426 long segmentId, Properties tableProperties, RowSource rowSource) 427 throws StandardException; 428 429 430 438 public StreamContainerHandle openStreamContainer( 439 long segmentId, 440 long containerId, 441 boolean hold) 442 throws StandardException; 443 444 454 public abstract void dropStreamContainer(long segmentId, long containerId) 455 throws StandardException; 456 457 472 public void logAndDo(Loggable operation) throws StandardException; 473 474 475 483 public void addPostCommitWork(Serviceable work); 484 485 491 public void addPostTerminationWork(Serviceable work); 492 493 498 public boolean isIdle(); 499 500 505 public boolean isPristine(); 506 507 510 public FileResource getFileHandler(); 511 512 515 public abstract long[] getCacheStats(String cacheName); 516 517 520 public abstract void resetCacheStats(String cacheName); 521 522 525 public boolean anyoneBlocked(); 526 527 551 void createXATransactionFromLocalTransaction( 552 int format_id, 553 byte[] global_id, 554 byte[] branch_id) 555 throws StandardException; 556 557 570 public void xa_commit( 571 boolean onePhase) 572 throws StandardException; 573 574 588 public int xa_prepare() 589 throws StandardException; 590 public static final int XA_RDONLY = 1; 591 public static final int XA_OK = 2; 592 593 602 public void xa_rollback() 603 throws StandardException; 604 605 606 610 public String getActiveStateTxIdString(); 611 612 613 614 } 615 | Popular Tags |