示例#1
0
 /**
  * Convenience method for obtaining the key created for the opList serial tests may put this key
  * on the BB for other threads to use for opList access
  */
 public static String getOpListKey() {
   return OpListKey + Thread.currentThread().getName();
 }
示例#2
0
 /** Convenience method for reading the list of operations for the current client thread. */
 public static OpList getOpList() {
   Object key = OpListKey + Thread.currentThread().getName();
   OpList opList = (OpList) (AsyncMsgBB.getBB().getSharedMap().get(key));
   Log.getLogWriter().info("AsyncBB read from shared map key " + key + ", value " + opList);
   return opList;
 }
示例#3
0
 /**
  * Return the expected commit success/failure for the current thread.
  *
  * @returns true if the current thread should succeed in its commit, false otherwise.
  */
 public static boolean getCommitStatus() {
   Object key = TxBB.CommitStatusKey + Thread.currentThread().getName();
   Object result = TxBB.getBB().getSharedMap().get(key);
   if (result instanceof Boolean) return ((Boolean) result).booleanValue();
   else throw new TestException("Unknown value " + result + " for TxBB sharedMap key " + key);
 }
示例#4
0
 /** Convenience method for writing a list of operations for the current client thread. */
 public static void putOpList(OpList opList) {
   Object key = OpListKey + Thread.currentThread().getName();
   AsyncMsgBB.getBB().getSharedMap().put(key, opList);
   Log.getLogWriter().info("AsyncBB put into shared map key " + key + ", value " + opList);
 }
示例#5
0
 /**
  * Write to the blackboard the expected commit success/failure for the current thread.
  *
  * @param expectCommitStatus True if we expect the current thread to successfully commit, false
  *     otherwise.
  */
 public static void recordCommitStatus(boolean expectCommitStatus) {
   Object key = TxBB.CommitStatusKey + Thread.currentThread().getName();
   TxBB.getBB().getSharedMap().put(key, new Boolean(expectCommitStatus));
   Log.getLogWriter().info("Written to TxBB: " + key + ", " + expectCommitStatus);
 }