From d479253768d296a40b4f699e1de9b03c7146a97a Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 3 Dec 2013 14:03:28 -0800 Subject: Adding javadocs and Carbonado User Guide --- .../com/amazon/carbonado/spi/RepairExecutor.html | 271 +++++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100644 apidocs/com/amazon/carbonado/spi/RepairExecutor.html (limited to 'apidocs/com/amazon/carbonado/spi/RepairExecutor.html') diff --git a/apidocs/com/amazon/carbonado/spi/RepairExecutor.html b/apidocs/com/amazon/carbonado/spi/RepairExecutor.html new file mode 100644 index 0000000..ed413da --- /dev/null +++ b/apidocs/com/amazon/carbonado/spi/RepairExecutor.html @@ -0,0 +1,271 @@ + + + + + + +RepairExecutor (Carbonado 1.2.3 API) + + + + + + + +
+ + + + + +
+ + + +
+
com.amazon.carbonado.spi
+

Class RepairExecutor

+
+
+ +
+
    +
  • +
    +
    +
    public class RepairExecutor
    +extends java.lang.Object
    +
    A convenience class for repositories to run dynamic repairs in separate + threads. When a repository detects a consistency error during a user + operation, it should not perform the repair in the same thread. + +

    If the repair was initiated by an exception, but the original exception + is re-thrown, a transaction exit will rollback the repair! Executing the + repair in a separate thread allows it to wait until the transaction has + exited. + +

    Other kinds of inconsistencies might be detected during cursor + iteration. The repair will need to acquire write locks, but the open cursor + might not allow that, resulting in deadlock. Executing the repair in a + separate thread allows it to wait until the cursor has released locks. + +

    This class keeps thread-local references to single-threaded executors. In + other words, each user thread has at most one associated repair thread. Each + repair thread has a fixed size queue, and they exit when they are idle. If + the queue is full, newly added repair tasks are silently discarded. + +

    The following system properties are supported: + +

      +
    • com.amazon.carbonado.spi.RepairExecutor.keepAliveSeconds (default is 10) +
    • com.amazon.carbonado.spi.RepairExecutor.queueSize (default is 10000) +
    +
    Author:
    +
    Brian S O'Neill
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      Methods 
      Modifier and TypeMethod and Description
      static voidexecute(java.lang.Runnable repair) 
      static booleanwaitForRepairsToFinish(long timeoutMillis) +
      Waits for repairs that were executed from the current thread to finish.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        execute

        +
        public static void execute(java.lang.Runnable repair)
        +
      • +
      + + + +
        +
      • +

        waitForRepairsToFinish

        +
        public static boolean waitForRepairsToFinish(long timeoutMillis)
        +                                      throws java.lang.InterruptedException
        +
        Waits for repairs that were executed from the current thread to finish.
        +
        Returns:
        true if all repairs are finished
        +
        Throws:
        +
        java.lang.InterruptedException
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + +
+ + +

Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.

+ + -- cgit v1.2.3