public FileQueue( int concurrentWrites, FileCommitCallback callback ) {
if ( concurrentWrites < 1 ) {
throw new ArgumentOutOfRangeException( "concurrentWrites" );
} else if ( bufferSize < 1 ) {
throw new ArgumentOutOfRangeException( "bufferSize" );
} else if ( callback == null ) {
throw new ArgumentNullException( "callback" );
}
this.syncRoot = new object();
this.active = new Chunk[concurrentWrites];
this.pending = new Queue<Page>();
this.callback = callback;
this.idle = new ManualResetEvent( true );
}