eu.xtreemos.xosd.localallocmgr.migrations
Class SimpleTransaction

java.lang.Object
  extended by eu.xtreemos.xosd.localallocmgr.migrations.SimpleTransaction

public class SimpleTransaction
extends java.lang.Object

stores the original representations of the elements. When setting a checkpoint, only the first state is stored. If an element is already in the transaction, the new state is not stored.

Author:
urosjovanovic

Field Summary
private  java.util.ArrayList<java.lang.Integer> checkPointOrderedList
           
static int id
           
private  java.util.Hashtable<java.lang.Integer,java.lang.String> originals
           
private static XStream stream
           
 
Constructor Summary
SimpleTransaction()
           
 
Method Summary
 void addCheckpoint(java.lang.Object o)
           
 java.lang.Object restore(int hash)
           
 java.util.ArrayList<java.lang.Object> restoreAll()
           
 java.util.ArrayList<java.lang.Object> restoreAll(java.util.ArrayList<java.lang.Object> objs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

public static int id

stream

private static XStream stream

originals

private java.util.Hashtable<java.lang.Integer,java.lang.String> originals

checkPointOrderedList

private java.util.ArrayList<java.lang.Integer> checkPointOrderedList
Constructor Detail

SimpleTransaction

public SimpleTransaction()
Method Detail

addCheckpoint

public void addCheckpoint(java.lang.Object o)

restore

public java.lang.Object restore(int hash)

restoreAll

public java.util.ArrayList<java.lang.Object> restoreAll(java.util.ArrayList<java.lang.Object> objs)

restoreAll

public java.util.ArrayList<java.lang.Object> restoreAll()