text: public virtual IndexCommit Snapshot(){lock (this){if (!initCalled){throw new InvalidOperationException("this instance is not being used by IndexWriter; be sure to use the instance returned from writer.getConfig().getIndexDeletionPolicy()");}if (m_lastCommit == null){throw new InvalidOperationException("No index commit to snapshot");}IncRef(m_lastCommit);return m_lastCommit;}}