Set state = (Set)txState.get(tx);
if (state == null && forUpdate)
{
state = (Set)base.getClass().newInstance();
state.addAll(base);
txState.set(tx, state);
long newId = versionId + 1;
synchManager.registerUpdate(tx, this);
txVersion.set(tx, new Long(newId));
return state;