@Override public synchronized ResultExternal createShallowCopy() { if (parent != null) { return parent.createShallowCopy(); } if (closed) { return null; } childCount++; return new ResultTempTable(this); }
@Override public synchronized void close() { if (closed) { return; } closed = true; if (parent != null) { parent.closeChild(); } else { if (childCount == 0) { dropTable(); } } }