at.gv.egovernment.moa.spss.server.transaction
Class TransactionIDGenerator
java.lang.Object
|
+--at.gv.egovernment.moa.spss.server.transaction.TransactionIDGenerator
- public class TransactionIDGenerator
- extends Object
A generator for unique transaction IDs.
The transaction IDs are of the form "-", where:
base
is initialized with the system time when this class is
being loaded
counter
is incremented sequentially on each call to
nextID()
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.
- Author:
- Patrick Peck, Stefan Knirsch
Method Summary |
static String |
nextID()
Returns the next transaction ID. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransactionIDGenerator
public TransactionIDGenerator()
nextID
public static String nextID()
- Returns the next transaction ID.
- Returns:
- The next transaction ID.