@Override
public boolean addRelation(InternalRelation r) {
Preconditions.checkArgument(r.isNew());
if (addedRelations==AddedRelationsContainer.EMPTY) {
if (tx().getConfiguration().isSingleThreaded()) {
addedRelations=new SimpleAddedRelations();
} else {
synchronized (this) {
if (addedRelations==AddedRelationsContainer.EMPTY)
addedRelations=new ConcurrentAddedRelations();
}