[jboss-svn-commits] JBL Code SVN: r35397 - in labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US: extras and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Oct 4 02:49:07 EDT 2010


Author: misty at redhat.com
Date: 2010-10-04 02:49:06 -0400 (Mon, 04 Oct 2010)
New Revision: 35397

Added:
   labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java
   labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java
Modified:
   labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml
   labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java
Log:
Finished converting ArjunaCore Programmer's Guide to Docbook

Modified: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml	2010-10-04 06:38:27 UTC (rev 35396)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/Appendix_Class_Definitions.xml	2010-10-04 06:49:06 UTC (rev 35397)
@@ -6,64 +6,40 @@
 <appendix>
   <title>Class definitions</title>
   <para>
-
+    This appendix contains an overview of those classes that the application programmer will typically use. The aim of
+    this appendix is to provide a quick reference guide to these classes for use when writing applications in
+    TxCore. For clarity only the public and protected interfaces of the classes will be given.
   </para>
-  <section>
-    <title><classname>LockManager</classname></title>
-    <para>
 
-    </para>
-  </section>
+  <example>
+    <title>Class <classname>LockManager</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/LockManager_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
 
-  
-  <section>
-    <title><classname>StateManager</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>InputObjectState</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>OutputObjectState</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>InputBuffer</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>OutputBuffer</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>Uid</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
-  <section>
-    <title><classname>AtomicAction</classname></title>
-    <para>
-      
-    </para>
-    
-  </section>
+    <example>
+    <title>Class <classname>StateManager</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/StateManager_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+      <title>Classes <classname>OutputObjectState</classname> and <classname>InputObjectState</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/OutputObjectState_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+      <title>Classes <classname>OutputBuffer</classname> and <classname>InputBuffer</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/OutputBuffer_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+    <title>Class <classname>Uid</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/Uid_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
+    <example>
+    <title>Class <classname>AtomicAction</classname></title>
+    <programlisting language="Java" role="JAVA"><xi:include href="extras/AtomicAction_class.java" xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" /></programlisting>
+  </example>
+
 </appendix>
 

Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/AtomicAction_class.java	2010-10-04 06:49:06 UTC (rev 35397)
@@ -0,0 +1,21 @@
+public class AtomicAction
+{
+    public AtomicAction ();
+
+    public void begin () throws SystemException, SubtransactionsUnavailable,
+                                NoTransaction;
+    public void commit (boolean report_heuristics) throws SystemException, 
+                                                          NoTransaction, HeuristicMixed,
+                                                          HeuristicHazard,TransactionRolledBack;
+    public void rollback () throws SystemException, NoTransaction;
+    public Control control () throws SystemException, NoTransaction;
+    public Status get_status () throws SystemException;
+    /* Allow action commit to be supressed */    
+    public void rollbackOnly () throws SystemException, NoTransaction;
+
+    public void registerResource (Resource r) throws SystemException, Inactive;
+    public void registerSubtransactionAwareResource (SubtransactionAwareResource sr)
+        throws SystemException, NotSubtransaction;
+    public void registerSynchronization (Synchronization s) throws SystemException,
+                                                                   Inactive;
+};
\ No newline at end of file

Modified: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java	2010-10-04 06:38:27 UTC (rev 35396)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/LockManager_class.java	2010-10-04 06:49:06 UTC (rev 35397)
@@ -1,4 +1,38 @@
+public class LockResult
+{
+    public static final int GRANTED;
+    public static final int REFUSED;
+    public static final int RELEASED;
+};
+
+public class ConflictType
+{
+    public static final int CONFLICT;
+    public static final int COMPATIBLE;
+    public static final int PRESENT;
+};
+
 public abstract class LockManager extends StateManager
 {
-    public LockResult setlock (Lock toSet, int retry, int timeout);
+    public static final int defaultRetry;
+    public static final int defaultTimeout;
+    public static final int waitTotalTimeout;
+
+    public final synchronized boolean releaselock (Uid lockUid);
+    public final synchronized int setlock (Lock toSet);
+    public final synchronized int setlock (Lock toSet, int retry);
+    public final synchronized int setlock (Lock toSet, int retry, int sleepTime);
+    public void print (PrintStream strm);
+    public String type ();
+    public boolean save_state (OutputObjectState os, int ObjectType);
+    public boolean restore_state (InputObjectState os, int ObjectType);
+
+    protected LockManager ();
+    protected LockManager (int ot);
+    protected LockManager (int ot, int objectModel);
+    protected LockManager (Uid storeUid);
+    protected LockManager (Uid storeUid, int ot);
+    protected LockManager (Uid storeUid, int ot, int objectModel);
+
+    protected void terminate ();
 };
\ No newline at end of file

Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputBuffer_class.java	2010-10-04 06:49:06 UTC (rev 35397)
@@ -0,0 +1,42 @@
+public class OutputBuffer
+{
+    public  OutputBuffer ();
+
+    public final synchronized boolean valid ();
+    public synchronized byte[] buffer();
+    public synchronized int length ();
+
+    /* pack operations for standard Java types */
+
+    public synchronized void packByte (byte b) throws IOException;
+    public synchronized void packBytes (byte[] b) throws IOException;
+    public synchronized void packBoolean (boolean b) throws IOException;
+    public synchronized void packChar (char c) throws IOException;
+    public synchronized void packShort (short s) throws IOException;
+    public synchronized void packInt (int i) throws IOException;
+    public synchronized void packLong (long l) throws IOException;
+    public synchronized void packFloat (float f) throws IOException;
+    public synchronized void packDouble (double d) throws IOException;
+    public synchronized void packString (String s) throws IOException;
+};
+public class InputBuffer
+{
+    public  InputBuffer ();
+
+    public final synchronized boolean valid ();
+    public synchronized byte[] buffer();
+    public synchronized int length ();
+
+    /* unpack operations for standard Java types */
+
+    public synchronized byte unpackByte () throws IOException;
+    public synchronized byte[] unpackBytes () throws IOException;
+    public synchronized boolean unpackBoolean () throws IOException;
+    public synchronized char unpackChar () throws IOException;
+    public synchronized short unpackShort () throws IOException;
+    public synchronized int unpackInt () throws IOException;
+    public synchronized long unpackLong () throws IOException;
+    public synchronized float unpackFloat () throws IOException;
+    public synchronized double unpackDouble () throws IOException;
+    public synchronized String unpackString () throws IOException;
+};
\ No newline at end of file

Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/OutputObjectState_class.java	2010-10-04 06:49:06 UTC (rev 35397)
@@ -0,0 +1,18 @@
+class OutputObjectState extends OutputBuffer
+{
+    public OutputObjectState (Uid newUid, String typeName);
+
+    public boolean notempty ();
+    public int size ();
+    public Uid stateUid ();
+    public String type ();
+};
+class InputObjectState extends ObjectState
+{
+    public OutputObjectState (Uid newUid, String typeName, byte[] b);
+
+    public boolean notempty ();
+    public int size ();
+    public Uid stateUid ();
+    public String type ();
+};
\ No newline at end of file

Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/StateManager_class.java	2010-10-04 06:49:06 UTC (rev 35397)
@@ -0,0 +1,42 @@
+public class ObjectStatus
+{
+    public static final int PASSIVE;
+    public static final int PASSIVE_NEW;
+    public static final int ACTIVE;
+    public static final int ACTIVE_NEW;
+};
+
+public class ObjectType
+{
+    public static final int RECOVERABLE;
+    public static final int ANDPERSISTENT;
+    public static final int NEITHER;
+};
+ 
+public abstract class StateManager
+{
+    public boolean restore_state (InputObjectState os, int ot);
+    public boolean save_state (OutputObjectState os, int ot);
+    public String type ();
+
+    public synchronized boolean activate ();
+    public synchronized boolean activate (String rootName);
+    public synchronized boolean deactivate ();
+    public synchronized boolean deactivate (String rootName);
+    public synchronized boolean deactivate (String rootName, boolean commit);
+
+    public synchronized int status ();
+    public final Uid get_uid ();
+    public void destroy ();
+    public void print (PrintStream strm);
+
+    protected void terminate ();
+
+    protected StateManager ();
+    protected StateManager (int ot);
+    protected StateManager (int ot, int objectModel);
+    protected StateManager (Uid objUid);
+    protected StateManager (Uid objUid, int ot);
+    protected StateManager (Uid objUid, int ot, int objectModel);
+    protected synchronized final void modified ();
+};
\ No newline at end of file

Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/Uid_class.java	2010-10-04 06:49:06 UTC (rev 35397)
@@ -0,0 +1,21 @@
+public class Uid implements Cloneable
+{
+    public Uid ();
+    public Uid (Uid copyFrom);
+    public Uid (String uidString);
+    public Uid (String uidString, boolean errorsOk);
+    public synchronized void pack (OutputBuffer packInto) throws IOException;
+    public synchronized void unpack (InputBuffer unpackFrom) throws IOException;
+
+    public void print (PrintStream strm);
+    public String toString ();
+    public Object clone () throws CloneNotSupportedException;
+    public synchronized void copy (Uid toCopy) throws UidException;
+    public boolean equals (Uid u);
+    public boolean notEquals (Uid u);
+    public boolean lessThan (Uid u);
+    public boolean greaterThan (Uid u);
+
+    public synchronized final boolean valid ();
+    public static synchronized Uid nullUid ();
+};
\ No newline at end of file

Added: labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java
===================================================================
--- labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java	                        (rev 0)
+++ labs/jbosstm/trunk/ArjunaCore/docs/user_guide/ArjunaCore_Development_Guide/en-US/extras/appendix_StateStatus.java	2010-10-04 06:49:06 UTC (rev 35397)
@@ -0,0 +1,63 @@
+
+/*
+ * This is the base class from which all object store types are derived.
+ * Note that because object store instances are stateless, to improve
+ * efficiency we try to only create one instance of each type per process.
+ * Therefore, the create and destroy methods are used instead of new
+ * and delete. If an object store is accessed via create it *must* be
+ * deleted using destroy. Of course it is still possible to make use of
+ * new and delete directly and to create instances on the stack.
+ */
+
+public class StateStatus
+{
+    public static final int OS_ORIGINAL;
+    public static final int OS_SHADOW;
+    public static final int OS_UNCOMMITTED;
+    public static final int OS_UNCOMMITTED_HIDDEN;
+    public static final int OS_UNKNOWN;
+}
+
+public class StateType
+{
+    public static final int OS_COMMITTED;
+    public static final int OS_COMMITTED_HIDDEN;
+    public static final int OS_HIDDEN;
+    public static final int OS_INVISIBLE;
+}
+
+public abstract class ObjectStore implements BaseStore, ParticipantStore,
+                                             RecoveryStore, TxLog
+{
+    public ObjectStore (String osRoot);
+    public synchronized boolean allObjUids (String s, InputObjectState buff)
+        throws ObjectStoreException;
+    public synchronized boolean allObjUids (String s, InputObjectState buff,
+                                            int m) throws ObjectStoreException;
+
+    public synchronized boolean allTypes (InputObjectState buff)
+        throws ObjectStoreException;
+    public synchronized int currentState(Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean commit_state (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean hide_state (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean reveal_state (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized InputObjectState read_committed (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized InputObjectState read_uncommitted (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean remove_committed (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean remove_uncommitted (Uid u, String tn)
+        throws ObjectStoreException;
+    public synchronized boolean write_committed (Uid u, String tn,
+                                                 OutputObjectState buff)
+        throws ObjectStoreException;
+    public synchronized boolean write_uncommitted (Uid u, String tn,
+                                                   OutputObjectState buff)
+        throws ObjectStoreException;
+    public static void printState (PrintStream strm, int res);
+};
\ No newline at end of file



More information about the jboss-svn-commits mailing list