diff options
author | (no author) <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2005-07-18 07:19:15 +0000 |
---|---|---|
committer | (no author) <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2005-07-18 07:19:15 +0000 |
commit | a14de9592f27182b8b3ef7dfe3950ce4a9c843e0 (patch) | |
tree | 4cb2968dc180fbef2e2ca43df81e9b9ca5469e3e /spss.server/src/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java | |
parent | ac3296bb205048da5a1e4494dd4956f4312cf948 (diff) | |
download | moa-id-spss-a14de9592f27182b8b3ef7dfe3950ce4a9c843e0.tar.gz moa-id-spss-a14de9592f27182b8b3ef7dfe3950ce4a9c843e0.tar.bz2 moa-id-spss-a14de9592f27182b8b3ef7dfe3950ce4a9c843e0.zip |
This commit was manufactured by cvs2svn to create tagtags/Build-ID-1_2_0_D10
'Build-ID-1_2_0_D10'.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/Build-ID-1_2_0_D10@383 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java')
-rw-r--r-- | spss.server/src/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java b/spss.server/src/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java deleted file mode 100644 index 6eb07defe..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java +++ /dev/null @@ -1,51 +0,0 @@ -package at.gv.egovernment.moa.spss.server.transaction; - - -/** - * A generator for unique transaction IDs. - * - * <p>The transaction IDs are of the form "<base>-<counter>", where: - * <ul> - * <li><code>base</code> is initialized with the system time when this class is - * being loaded</li> - * <li><code>counter</code> is incremented sequentially on each call to - * <code>nextID()</code></li> - * </ul> - * </p> - * - * <p> Assuming that it is highly unlikely that MOA servers are started at - * exactly the same time instant, the mechanism provided by this class should - * guarantee unique transaction IDs across multiple restarts and/or instances of - * the server.</p> - * - * @author Patrick Peck - * @author Stefan Knirsch - */ -public class TransactionIDGenerator { - - /** Request sequence number. */ - private static long counter = 0; - /** The base value to which to append the sequence number. */ - private static String base = null; - - /** - * Set up the initial base value. - */ - static { - synchronized (TransactionIDGenerator.class) { - base = Long.toString(System.currentTimeMillis()); - } - } - - /** - * Returns the next transaction ID. - * - * @return The next transaction ID. - */ - public static synchronized String nextID() { - counter++; - - return (base + "-" + counter); - } - -} |