| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>ConcurrentTestCommandGenerator (Calcite 1.20.0 Test API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ConcurrentTestCommandGenerator (Calcite 1.20.0 Test API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ConcurrentTestCommandGenerator.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.calcite.test.concurrent</a></div> |
| <h2 title="Class ConcurrentTestCommandGenerator" class="title">Class ConcurrentTestCommandGenerator</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.test.concurrent.ConcurrentTestCommandGenerator</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="ConcurrentTestCommandScript.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandScript</a></code>, <code><a href="ConcurrentTestTimedCommandGenerator.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestTimedCommandGenerator</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public class <span class="typeNameLabel">ConcurrentTestCommandGenerator</span> |
| extends java.lang.Object</pre> |
| <div class="block">ConcurrentTestCommandGenerator creates instances of |
| <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommand</code></a> that perform specific actions in a specific |
| order and within the context of a test thread |
| (<a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommandExecutor</code></a>). |
| |
| <p>Typical actions include preparing a SQL statement for execution, executing |
| the statement and verifying its result set, and closing the statement.</p> |
| |
| <p>A single ConcurrentTestCommandGenerator creates commands for |
| multiple threads. Each thread is represented by an integer "thread ID". |
| Thread IDs may take on any positive integer value and may be a sparse set |
| (e.g. 1, 2, 5).</p> |
| |
| <p>When each command is created, it is associated with a thread and given an |
| execution order. Execution order values are positive integers, must be unique |
| within a thread, and may be a sparse set.</p> |
| |
| <p>There are no restrictions on the order of command creation.</p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.AbstractCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.AbstractCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">abstract base to handle SQLExceptions</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.AutoSynchronizationCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.AutoSynchronizationCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">AutoSynchronizationCommand is idential to SynchronizationCommand, except |
| that it is generated automatically by the test harness and is not counted |
| when displaying the step number in which an error occurred.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.CloseCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.CloseCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">CloseCommand closes a previously prepared statement.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.CommandWithTimeout.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.CommandWithTimeout</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Command that executes statements with a given timeout.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.CommitCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.CommitCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">CommitCommand commits pending transactions via |
| <code>Connection.commit()</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.DdlCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.DdlCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">DdlCommand executes DDL commands.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.ExplainCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.ExplainCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">ExplainCommand executes explain plan commands.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.FailedThread.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.FailedThread</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Describes a thread that failed</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.FetchAndCompareCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.FetchAndCompareCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">FetchAndCompareCommand executes a previously prepared statement stored in |
| the ConcurrentTestCommandExecutor and then validates the returned |
| rows against expected data.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.InsertCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.InsertCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">InsertCommand exeutes an insert, update or delete SQL statement.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.PrepareCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.PrepareCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">PrepareCommand creates a <code>PreparedStatement</code>.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.RollbackCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.RollbackCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">RollbackCommand rolls back pending transactions via |
| <code>Connection.rollback()</code>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.SleepCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.SleepCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">SleepCommand causes the execution thread to wait for all other threads in |
| the test before continuing.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>(package private) static class </code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="ConcurrentTestCommandGenerator.SynchronizationCommand.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.SynchronizationCommand</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">SynchronizationCommand causes the execution thread to wait for all other |
| threads in the test before continuing.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static char</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#APOS">APOS</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static char</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#COMMA">COMMA</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#debug">debug</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected java.io.PrintStream</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#debugStream">debugStream</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private java.util.List<<a href="ConcurrentTestCommandGenerator.FailedThread.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.FailedThread</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#failedThreads">failedThreads</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Collects threads that failed.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected java.util.Properties</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#jdbcProps">jdbcProps</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#jdbcURL">jdbcURL</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private static char</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LEFT_BRACKET">LEFT_BRACKET</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static char</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#RIGHT_BRACKET">RIGHT_BRACKET</a></span></code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private java.util.TreeMap<java.lang.Integer,​java.util.TreeMap<java.lang.Integer,​<a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a>>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#threadMap">threadMap</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Maps Integer thread IDs to a TreeMap.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private java.util.TreeMap<java.lang.Integer,​java.lang.String></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#threadNameMap">threadNameMap</a></span></code></th> |
| <td class="colLast"> |
| <div class="block">Maps Integer thread IDs to thread names.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">ConcurrentTestCommandGenerator</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a new ConcurrentTestCommandGenerator.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCloseCommand(int,int)">addCloseCommand</a></span>​(int threadId, |
| int order)</code></th> |
| <td class="colLast"> |
| <div class="block">Closes a previously <a href="#addPrepareCommand(int,int,java.lang.String)"><code>prepared</code></a> |
| SQL statement.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCommand(int,int,org.apache.calcite.test.concurrent.ConcurrentTestCommand)">addCommand</a></span>​(int threadId, |
| int order, |
| <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> command)</code></th> |
| <td class="colLast"> |
| <div class="block">Handles adding a command to <a href="#threadMap"><code>threadMap</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCommitCommand(int,int)">addCommitCommand</a></span>​(int threadId, |
| int order)</code></th> |
| <td class="colLast"> |
| <div class="block">Commits pending transaction on the thread's connection.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addDdlCommand(int,int,java.lang.String)">addDdlCommand</a></span>​(int threadId, |
| int order, |
| java.lang.String ddl)</code></th> |
| <td class="colLast"> |
| <div class="block">Executes a DDL statement immediately.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addExplainCommand(int,int,java.lang.String)">addExplainCommand</a></span>​(int threadId, |
| int order, |
| java.lang.String sql)</code></th> |
| <td class="colLast"> |
| <div class="block">Adds an "explain plan" command.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addFetchAndCompareCommand(int,int,int,java.lang.String)">addFetchAndCompareCommand</a></span>​(int threadId, |
| int order, |
| int timeout, |
| java.lang.String expected)</code></th> |
| <td class="colLast"> |
| <div class="block">Executes a previously |
| <a href="#addPrepareCommand(int,int,java.lang.String)"><code>prepared</code></a> SQL statement and |
| compares its <code>ResultSet</code> to the given data.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addInsertCommand(int,int,int,java.lang.String)">addInsertCommand</a></span>​(int threadId, |
| int order, |
| int timeout, |
| java.lang.String sql)</code></th> |
| <td class="colLast"> |
| <div class="block">Executes the given SQL via <code>Statement.executeUpdate(String)</code>.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addPrepareCommand(int,int,java.lang.String)">addPrepareCommand</a></span>​(int threadId, |
| int order, |
| java.lang.String sql)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <code>PreparedStatement</code> for the given SQL.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addRollbackCommand(int,int)">addRollbackCommand</a></span>​(int threadId, |
| int order)</code></th> |
| <td class="colLast"> |
| <div class="block">Rolls back pending transaction on the thread's connection.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addSleepCommand(int,int,long)">addSleepCommand</a></span>​(int threadId, |
| int order, |
| long millis)</code></th> |
| <td class="colLast"> |
| <div class="block">Causes the given thread to sleep for the indicated number of |
| milliseconds.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addSynchronizationCommand(int,int)">addSynchronizationCommand</a></span>​(int threadId, |
| int order)</code></th> |
| <td class="colLast"> |
| <div class="block">Adds a synchronization commands.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>(package private) void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#customErrorHandler(org.apache.calcite.test.concurrent.ConcurrentTestCommandExecutor)">customErrorHandler</a></span>​(<a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandExecutor</a> executor)</code></th> |
| <td class="colLast"> |
| <div class="block">Custom error handling occurs here if |
| <a href="#requiresCustomErrorHandling()"><code>requiresCustomErrorHandling()</code></a> returns true.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#execute()">execute</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a <a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommandExecutor</code></a> object for each define |
| thread, and then runs them all.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#failed()">failed</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns whether any test thread failed.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>(package private) java.lang.Iterable<<a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCommandIterable(int)">getCommandIterable</a></span>​(int threadId)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns an <code>Iterator</code> of <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommand</code></a> |
| objects for the given thread ID.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>(package private) java.util.Collection<<a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCommands(int)">getCommands</a></span>​(int threadId)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a <code>Collection</code> of <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommand</code></a> |
| objects for the given thread ID.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>java.util.List<<a href="ConcurrentTestCommandGenerator.FailedThread.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.FailedThread</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFailedThreads()">getFailedThreads</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>protected java.util.Set<java.lang.Integer></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getThreadIds()">getThreadIds</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a set of thread IDs.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>protected java.lang.String</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getThreadName(java.lang.Integer)">getThreadName</a></span>​(java.lang.Integer threadId)</code></th> |
| <td class="colLast"> |
| <div class="block">Retrieves the name of a given thread.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasValidSynchronization()">hasValidSynchronization</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Validates that all threads have the same number of |
| SynchronizationCommands (otherwise a deadlock is guaranteed).</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>protected <a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandExecutor</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#innerExecute()">innerExecute</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#postExecute(org.apache.calcite.test.concurrent.ConcurrentTestCommandExecutor%5B%5D)">postExecute</a></span>​(<a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandExecutor</a>[] threads)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>(package private) void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#printCommands(java.io.PrintStream,java.lang.Integer)">printCommands</a></span>​(java.io.PrintStream out, |
| java.lang.Integer threadId)</code></th> |
| <td class="colLast"> |
| <div class="block">Prints a description of the commands to be executed for a given thread.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>(package private) boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#requiresCustomErrorHandling()">requiresCustomErrorHandling</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Indicates whether commands generated by this generator require special |
| handling.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDataSource(java.lang.String,java.util.Properties)">setDataSource</a></span>​(java.lang.String jdbcURL, |
| java.util.Properties jdbcProps)</code></th> |
| <td class="colLast"> |
| <div class="block">Sets the jdbc data source for executing the command threads.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDebug(boolean)">setDebug</a></span>​(boolean enabled)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setDebug(boolean,java.io.PrintStream)">setDebug</a></span>​(boolean enabled, |
| java.io.PrintStream alternatePrintStream)</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setThreadName(int,java.lang.String)">setThreadName</a></span>​(int threadId, |
| java.lang.String name)</code></th> |
| <td class="colLast"> |
| <div class="block">Configures a human-readable name for a given thread identifier.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#synchronizeCommandSets()">synchronizeCommandSets</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Insures that the number of commands is the same for each thread, fills |
| missing order value with null commands, and interleaves a synchronization |
| command before each actual command.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="APOS"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>APOS</h4> |
| <pre>private static final char APOS</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.calcite.test.concurrent.ConcurrentTestCommandGenerator.APOS">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="COMMA"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>COMMA</h4> |
| <pre>private static final char COMMA</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.calcite.test.concurrent.ConcurrentTestCommandGenerator.COMMA">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="LEFT_BRACKET"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LEFT_BRACKET</h4> |
| <pre>private static final char LEFT_BRACKET</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.calcite.test.concurrent.ConcurrentTestCommandGenerator.LEFT_BRACKET">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="RIGHT_BRACKET"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>RIGHT_BRACKET</h4> |
| <pre>private static final char RIGHT_BRACKET</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../constant-values.html#org.apache.calcite.test.concurrent.ConcurrentTestCommandGenerator.RIGHT_BRACKET">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="debug"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>debug</h4> |
| <pre>protected boolean debug</pre> |
| </li> |
| </ul> |
| <a id="debugStream"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>debugStream</h4> |
| <pre>protected java.io.PrintStream debugStream</pre> |
| </li> |
| </ul> |
| <a id="jdbcURL"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdbcURL</h4> |
| <pre>protected java.lang.String jdbcURL</pre> |
| </li> |
| </ul> |
| <a id="jdbcProps"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>jdbcProps</h4> |
| <pre>protected java.util.Properties jdbcProps</pre> |
| </li> |
| </ul> |
| <a id="threadMap"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>threadMap</h4> |
| <pre>private java.util.TreeMap<java.lang.Integer,​java.util.TreeMap<java.lang.Integer,​<a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a>>> threadMap</pre> |
| <div class="block">Maps Integer thread IDs to a TreeMap. The TreeMap vaules map an Integer |
| execution order to a <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommand</code></a>.</div> |
| </li> |
| </ul> |
| <a id="threadNameMap"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>threadNameMap</h4> |
| <pre>private java.util.TreeMap<java.lang.Integer,​java.lang.String> threadNameMap</pre> |
| <div class="block">Maps Integer thread IDs to thread names.</div> |
| </li> |
| </ul> |
| <a id="failedThreads"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>failedThreads</h4> |
| <pre>private java.util.List<<a href="ConcurrentTestCommandGenerator.FailedThread.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.FailedThread</a>> failedThreads</pre> |
| <div class="block">Collects threads that failed. Cleared when execution starts, valid whe/n |
| execution has ended. Only failed threads appear in the list, so after a |
| successful test the list is empty.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ConcurrentTestCommandGenerator</h4> |
| <pre>public ConcurrentTestCommandGenerator()</pre> |
| <div class="block">Constructs a new ConcurrentTestCommandGenerator.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="addSynchronizationCommand(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addSynchronizationCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addSynchronizationCommand​(int threadId, |
| int order)</pre> |
| <div class="block">Adds a synchronization commands. When a thread reaches a synchronization |
| command it stops and waits for all other threads to reach their |
| synchronization commands. When all threads have reached their |
| synchronization commands, they are all released simultaneously (or as |
| close as one can get with <code>Object.notifyAll()</code>). Each thread must |
| have exactly the same number of synchronization commands.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addSleepCommand(int,int,long)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addSleepCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addSleepCommand​(int threadId, |
| int order, |
| long millis)</pre> |
| <div class="block">Causes the given thread to sleep for the indicated number of |
| milliseconds. Thread executes <code>Thread.sleep(long)</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dd><code>millis</code> - the length of time to sleep in milliseconds (must not be |
| negative)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addExplainCommand(int,int,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addExplainCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addExplainCommand​(int threadId, |
| int order, |
| java.lang.String sql)</pre> |
| <div class="block">Adds an "explain plan" command.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dd><code>sql</code> - the explain plan SQL (e.g. <code>"explain plan for select * |
| from t"</code>)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addPrepareCommand(int,int,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addPrepareCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addPrepareCommand​(int threadId, |
| int order, |
| java.lang.String sql)</pre> |
| <div class="block">Creates a <code>PreparedStatement</code> for the given SQL. This command does |
| not execute the SQL, it merely creates a PreparedStatement and stores it |
| in the ConcurrentTestCommandExecutor.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dd><code>sql</code> - the SQL to prepare (e.g. <code>"select * from t"</code>)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#addFetchAndCompareCommand(int,int,int,java.lang.String)"><code>addFetchAndCompareCommand(int, int, int, String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addFetchAndCompareCommand(int,int,int,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addFetchAndCompareCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addFetchAndCompareCommand​(int threadId, |
| int order, |
| int timeout, |
| java.lang.String expected)</pre> |
| <div class="block">Executes a previously |
| <a href="#addPrepareCommand(int,int,java.lang.String)"><code>prepared</code></a> SQL statement and |
| compares its <code>ResultSet</code> to the given data. |
| |
| <p><b>Expected data format:</b> <code>{ 'row1, col1 value', 'row1, col2 |
| value', ... }, { 'row2, col1 value', 'row2, col2 value', ... }, |
| ...</code></p> |
| |
| <ul> |
| <li>For string data: enclose value in apostrophes, use doubled apostrophe |
| to include an apostrophe in the value.</li> |
| <li>For integer or real data: simply use the stringified value (e.g. 123, |
| 12.3, 0.65). No scientific notation is allowed.</li> |
| <li>For null values, use the word <code>null</code> without quotes.</li> |
| </ul> |
| <b>Example:</b> <code>{ 'foo', 10, 3.14, null }</code> |
| |
| <p><b>Note on timeout:</b> If the previously prepared statement's |
| <code>Statement.setQueryTimeout(int)</code> method throws an |
| <code>UnsupportedOperationException</code> it is ignored and no timeout is set.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dd><code>timeout</code> - the query timeout, in seconds (see above)</dd> |
| <dd><code>expected</code> - the expected results (see above)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addCloseCommand(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addCloseCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addCloseCommand​(int threadId, |
| int order)</pre> |
| <div class="block">Closes a previously <a href="#addPrepareCommand(int,int,java.lang.String)"><code>prepared</code></a> |
| SQL statement.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addInsertCommand(int,int,int,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addInsertCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addInsertCommand​(int threadId, |
| int order, |
| int timeout, |
| java.lang.String sql)</pre> |
| <div class="block">Executes the given SQL via <code>Statement.executeUpdate(String)</code>. May |
| be used for update as well as insert statements. |
| |
| <p><b>Note on timeout:</b> If the previously prepared statement's |
| <code>Statement.setQueryTimeout(int)</code> method throws an |
| <code>UnsupportedOperationException</code> it is ignored and no timeout is set.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dd><code>timeout</code> - the query timeout, in seconds (see above)</dd> |
| <dd><code>sql</code> - the insert/update/delete SQL</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addCommitCommand(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addCommitCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addCommitCommand​(int threadId, |
| int order)</pre> |
| <div class="block">Commits pending transaction on the thread's connection.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addRollbackCommand(int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addRollbackCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addRollbackCommand​(int threadId, |
| int order)</pre> |
| <div class="block">Rolls back pending transaction on the thread's connection.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - the thread that should execute this command</dd> |
| <dd><code>order</code> - the execution order</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addDdlCommand(int,int,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addDdlCommand</h4> |
| <pre class="methodSignature">public <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addDdlCommand​(int threadId, |
| int order, |
| java.lang.String ddl)</pre> |
| <div class="block">Executes a DDL statement immediately. Assumes the statement returns no |
| information.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="addCommand(int,int,org.apache.calcite.test.concurrent.ConcurrentTestCommand)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addCommand</h4> |
| <pre class="methodSignature">protected <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> addCommand​(int threadId, |
| int order, |
| <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a> command)</pre> |
| <div class="block">Handles adding a command to <a href="#threadMap"><code>threadMap</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the newly-added command</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="setThreadName(int,java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setThreadName</h4> |
| <pre class="methodSignature">public void setThreadName​(int threadId, |
| java.lang.String name)</pre> |
| <div class="block">Configures a human-readable name for a given thread identifier. Does not |
| imply that the thread will be created -- that only happens if there are |
| commands added to the thread.</div> |
| </li> |
| </ul> |
| <a id="setDebug(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDebug</h4> |
| <pre class="methodSignature">protected void setDebug​(boolean enabled)</pre> |
| </li> |
| </ul> |
| <a id="setDebug(boolean,java.io.PrintStream)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDebug</h4> |
| <pre class="methodSignature">protected void setDebug​(boolean enabled, |
| java.io.PrintStream alternatePrintStream)</pre> |
| </li> |
| </ul> |
| <a id="setDataSource(java.lang.String,java.util.Properties)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDataSource</h4> |
| <pre class="methodSignature">public void setDataSource​(java.lang.String jdbcURL, |
| java.util.Properties jdbcProps)</pre> |
| <div class="block">Sets the jdbc data source for executing the command threads.</div> |
| </li> |
| </ul> |
| <a id="execute()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>execute</h4> |
| <pre class="methodSignature">public void execute() |
| throws java.lang.Exception</pre> |
| <div class="block">Creates a <a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommandExecutor</code></a> object for each define |
| thread, and then runs them all.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code> - if no connection found or if a thread operation is |
| interrupted</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="innerExecute()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>innerExecute</h4> |
| <pre class="methodSignature">protected <a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandExecutor</a>[] innerExecute() |
| throws java.lang.Exception</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="postExecute(org.apache.calcite.test.concurrent.ConcurrentTestCommandExecutor[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>postExecute</h4> |
| <pre class="methodSignature">protected void postExecute​(<a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandExecutor</a>[] threads) |
| throws java.lang.Exception</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.lang.Exception</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="failed()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>failed</h4> |
| <pre class="methodSignature">public boolean failed()</pre> |
| <div class="block">Returns whether any test thread failed. Valid after <a href="#execute()"><code>execute()</code></a> has |
| returned.</div> |
| </li> |
| </ul> |
| <a id="getFailedThreads()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFailedThreads</h4> |
| <pre class="methodSignature">public java.util.List<<a href="ConcurrentTestCommandGenerator.FailedThread.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandGenerator.FailedThread</a>> getFailedThreads()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the list of failed threads (unmodifiable)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="synchronizeCommandSets()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>synchronizeCommandSets</h4> |
| <pre class="methodSignature">public void synchronizeCommandSets()</pre> |
| <div class="block">Insures that the number of commands is the same for each thread, fills |
| missing order value with null commands, and interleaves a synchronization |
| command before each actual command. These steps are required for |
| synchronized execution in FarragoConcurrencyTestCase.</div> |
| </li> |
| </ul> |
| <a id="hasValidSynchronization()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasValidSynchronization</h4> |
| <pre class="methodSignature">public boolean hasValidSynchronization()</pre> |
| <div class="block">Validates that all threads have the same number of |
| SynchronizationCommands (otherwise a deadlock is guaranteed).</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true when valid, false when invalid.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getThreadIds()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThreadIds</h4> |
| <pre class="methodSignature">protected java.util.Set<java.lang.Integer> getThreadIds()</pre> |
| <div class="block">Returns a set of thread IDs.</div> |
| </li> |
| </ul> |
| <a id="getThreadName(java.lang.Integer)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getThreadName</h4> |
| <pre class="methodSignature">protected java.lang.String getThreadName​(java.lang.Integer threadId)</pre> |
| <div class="block">Retrieves the name of a given thread. If no thread names were configured, |
| returns the concatenation of "#" and the thread's numeric identifier.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>human-readable thread name</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="requiresCustomErrorHandling()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>requiresCustomErrorHandling</h4> |
| <pre class="methodSignature">boolean requiresCustomErrorHandling()</pre> |
| <div class="block">Indicates whether commands generated by this generator require special |
| handling. Default implement returns false.</div> |
| </li> |
| </ul> |
| <a id="customErrorHandler(org.apache.calcite.test.concurrent.ConcurrentTestCommandExecutor)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>customErrorHandler</h4> |
| <pre class="methodSignature">void customErrorHandler​(<a href="ConcurrentTestCommandExecutor.html" title="class in org.apache.calcite.test.concurrent">ConcurrentTestCommandExecutor</a> executor)</pre> |
| <div class="block">Custom error handling occurs here if |
| <a href="#requiresCustomErrorHandling()"><code>requiresCustomErrorHandling()</code></a> returns true. Default implementation |
| does nothing.</div> |
| </li> |
| </ul> |
| <a id="getCommands(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCommands</h4> |
| <pre class="methodSignature">java.util.Collection<<a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a>> getCommands​(int threadId)</pre> |
| <div class="block">Returns a <code>Collection</code> of <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommand</code></a> |
| objects for the given thread ID.</div> |
| </li> |
| </ul> |
| <a id="getCommandIterable(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCommandIterable</h4> |
| <pre class="methodSignature">java.lang.Iterable<<a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent">ConcurrentTestCommand</a>> getCommandIterable​(int threadId)</pre> |
| <div class="block">Returns an <code>Iterator</code> of <a href="ConcurrentTestCommand.html" title="interface in org.apache.calcite.test.concurrent"><code>ConcurrentTestCommand</code></a> |
| objects for the given thread ID.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>threadId</code> - Thread id</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="printCommands(java.io.PrintStream,java.lang.Integer)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>printCommands</h4> |
| <pre class="methodSignature">void printCommands​(java.io.PrintStream out, |
| java.lang.Integer threadId)</pre> |
| <div class="block">Prints a description of the commands to be executed for a given thread.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ConcurrentTestCommandGenerator.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2012–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |