public virtual void  OnCommit(System.Collections.IList commits)
		{
			lock (this)
			{
				primary.OnCommit(WrapCommits(commits));
				lastCommit = (IndexCommitPoint) commits[commits.Count - 1];
			}
		}
		/// <summary>Take a snapshot of the most recent commit to the
		/// index.  You must call release() to free this snapshot.
		/// Note that while the snapshot is held, the files it
		/// references will not be deleted, which will consume
		/// additional disk space in your index. If you take a
		/// snapshot at a particularly bad time (say just before
		/// you call optimize()) then in the worst case this could
		/// consume an extra 1X of your total index size, until
		/// you release the snapshot. 
		/// </summary>
		public virtual IndexCommitPoint Snapshot()
		{
			lock (this)
			{
				if (snapshot == null)
					snapshot = lastCommit;
				else
					throw new System.SystemException("snapshot is already set; please call release() first");
				return snapshot;
			}
		}
 /// <summary>Take a snapshot of the most recent commit to the
 /// index.  You must call release() to free this snapshot.
 /// Note that while the snapshot is held, the files it
 /// references will not be deleted, which will consume
 /// additional disk space in your index. If you take a
 /// snapshot at a particularly bad time (say just before
 /// you call optimize()) then in the worst case this could
 /// consume an extra 1X of your total index size, until
 /// you release the snapshot.
 /// </summary>
 public virtual IndexCommitPoint Snapshot()
 {
     lock (this)
     {
         if (snapshot == null)
         {
             snapshot = lastCommit;
         }
         else
         {
             throw new System.SystemException("snapshot is already set; please call release() first");
         }
         return(snapshot);
     }
 }
 internal MyCommitPoint(SnapshotDeletionPolicy enclosingInstance, IndexCommitPoint cp)
 {
     InitBlock(enclosingInstance);
     this.cp = cp;
 }
		/// <summary>Release the currently held snapshot. </summary>
		public virtual void  Release()
		{
			lock (this)
			{
				if (snapshot != null)
					snapshot = null;
				else
					throw new System.SystemException("snapshot was not set; please call snapshot() first");
			}
		}
			internal MyCommitPoint(SnapshotDeletionPolicy enclosingInstance, IndexCommitPoint cp)
			{
				InitBlock(enclosingInstance);
				this.cp = cp;
			}