public int getSize() {
        readLock.lock();
        try {
            normalize();
            int result = diff.get().size() + old.size() - deleted.get().size();
            for (String key : diff.get().keySet()) {
                if (old.containsKey(key)) {
                    --result;
                }
            }
            return result;
        } finally {
            readLock.unlock();
        }
    }