This is a very simple example of time-stamp ordering. The main program is declared within the class "Example". Classes whose instances can be accessed transactionally must extend "TSOTransactorObject". That superclass adds a field to record the most recent transaction that has accessed the object and an "enter" method for transactions to invoke when they access the object for the first time. Note how "enter" enforces strict isolation -- it fails with an exception if the new transaction is too late (i.e. its timestamp is before that of mostRecent) and it blocks if the transaction is operating in the correct order but mostRecent has not yet committed. A simple mechanism is used to allow objects' state to be rolled back if they have been updated by a transaction which subsequently aborts. Each "TSOTransactorObject" must define "getState" and "setState" methods for taking and restoring copies of its state. A running transaction maintains a vector of saved states for the objects that it has accessed. If the transaction aborts then it goes through this Vector and uses "setState" to restore each of the objects.