internal RateLimitedIndexOutput(RateLimiter rateLimiter, IndexOutput @delegate) { // TODO should we make buffer size configurable if (@delegate is BufferedIndexOutput) { bufferedDelegate = (BufferedIndexOutput)@delegate; this.@delegate = @delegate; } else { this.@delegate = @delegate; bufferedDelegate = null; } this.rateLimiter = rateLimiter; }