* Use LinkedHashMap for dirty node tracking to preserve insertion order.

see <http://helma.org/pipermail/helma-user/2008-May/007379.html>
This commit is contained in:
hns 2008-07-04 13:50:59 +00:00
parent 277737f940
commit d1600d4783

View file

@ -34,13 +34,13 @@ public class Transactor {
NodeManager nmgr; NodeManager nmgr;
// List of nodes to be updated // List of nodes to be updated
private HashMap dirtyNodes; private Map dirtyNodes;
// List of visited clean nodes // List of visited clean nodes
private HashMap cleanNodes; private Map cleanNodes;
// List of nodes whose child index has been modified // List of nodes whose child index has been modified
private HashSet parentNodes; private Set parentNodes;
// Is a transaction in progress? // Is a transaction in progress?
private volatile boolean active; private volatile boolean active;
@ -50,10 +50,10 @@ public class Transactor {
protected ITransaction txn; protected ITransaction txn;
// Transactions for SQL data sources // Transactions for SQL data sources
private HashMap sqlConnections; private Map sqlConnections;
// Set of SQL connections that already have been verified // Set of SQL connections that already have been verified
private HashSet testedConnections; private Set testedConnections;
// when did the current transaction start? // when did the current transaction start?
private long tstart; private long tstart;
@ -75,7 +75,7 @@ public class Transactor {
this.thread = Thread.currentThread(); this.thread = Thread.currentThread();
this.nmgr = nmgr; this.nmgr = nmgr;
dirtyNodes = new HashMap(); dirtyNodes = new LinkedHashMap();
cleanNodes = new HashMap(); cleanNodes = new HashMap();
parentNodes = new HashSet(); parentNodes = new HashSet();