示例#1
0
 @Override
 protected void callback(DebugInterface debug) throws KillSubProcess {
   if (twoPhaseCommitIn(debug.thread())) {
     debug.thread().suspend(null);
     this.disable();
     afterWrite.countDown();
     throw KillSubProcess.withExitCode(-1);
   }
 }
 @Override
 protected void callback(DebugInterface debug) throws KillSubProcess {
   if (counter++ > 0) return;
   thread = debug.thread().suspend(this);
   this.disable();
   barrier1.countDown();
 }
 @BreakpointHandler("removeProperty")
 public static void handleRemoveProperty(
     @BreakpointHandler("commitPropertyMaps") BreakPoint exitCommit, DebugInterface di) {
   if (readerThread == null) {
     removerThread = di.thread().suspend(null);
   }
   exitCommit.enable();
 }
 @BreakpointHandler("setProperties")
 public static void handleSetProperties(BreakPoint self, DebugInterface di) {
   self.disable();
   if (removerThread != null) {
     removerThread.resume();
     removerThread = null;
   }
   readerThread = di.thread().suspend(DebuggerDeadlockCallback.RESUME_THREAD);
 }
 @BreakpointHandler("readNextChunk")
 public static void onReadNextChunk(BreakPoint self, DebugInterface di) throws Exception {
   // Check because the interfering thread will trigger this too
   if (txCopyingThread != null && di.thread().name().equals(txCopyingThread.name())) {
     txCopyingThread.suspend(null);
     interferingThread.resume();
     self.disable();
   }
 }
 @BreakpointHandler("makeSureNextTransactionIsFullyFetched")
 public static void onStartingStoreCopy(
     BreakPoint self,
     DebugInterface di,
     @BreakpointHandler("readNextChunk") BreakPoint onReadNextChunk)
     throws Exception {
   // Wait for the other thread to recycle the channel
   latch.await();
   txCopyingThread = di.thread();
   self.disable();
 }
 @BreakpointHandler("waitTxCopyToStart")
 public static void onWaitTxCopyToStart(BreakPoint self, DebugInterface di) {
   interferingThread = di.thread().suspend(null);
   latch.countDown();
 }