Class RateLimitedDirectoryWrapper
A Directory wrapper that allows Index
Inherited Members
Namespace: Lucene.Net.Store
Assembly: Lucene.Net.dll
Syntax
public sealed class RateLimitedDirectoryWrapper : FilterDirectory
Constructors
| Improve this Doc View SourceRateLimitedDirectoryWrapper(Directory)
Declaration
public RateLimitedDirectoryWrapper(Directory wrapped)
Parameters
Type | Name | Description |
---|---|---|
Directory | wrapped |
Methods
| Improve this Doc View SourceCopy(Directory, String, String, IOContext)
Declaration
public override void Copy(Directory to, string src, string dest, IOContext context)
Parameters
Overrides
| Improve this Doc View SourceCreateOutput(String, IOContext)
Declaration
public override IndexOutput CreateOutput(string name, IOContext context)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | |
IOContext | context |
Returns
Type | Description |
---|---|
Index |
Overrides
| Improve this Doc View SourceCreateSlicer(String, IOContext)
Declaration
public override Directory.IndexInputSlicer CreateSlicer(string name, IOContext context)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | |
IOContext | context |
Returns
Type | Description |
---|---|
Directory. |
Overrides
| Improve this Doc View SourceGetMaxWriteMBPerSec(IOContext.UsageContext)
See SetMaxWriteMBPerSec(Nullable<Double>, IOContext.UsageContext).
Declaration
public double GetMaxWriteMBPerSec(IOContext.UsageContext context)
Parameters
Type | Name | Description |
---|---|---|
IOContext. |
context |
Returns
Type | Description |
---|---|
System. |
SetMaxWriteMBPerSec(Nullable<Double>, IOContext.UsageContext)
Sets the maximum (approx) MB/sec allowed by all write IO performed by
Indexnull
for mbPerSec
to have no limit.
NOTE: For already created Index
NOTE: this is an optional operation and might not be respected by all Directory implementations. Currently only buffered (FSDirectory) Directory implementations use rate-limiting.
Declaration
public void SetMaxWriteMBPerSec(double? mbPerSec, IOContext.UsageContext context)
Parameters
Type | Name | Description |
---|---|---|
System. |
mbPerSec | |
IOContext. |
context |
SetRateLimiter(RateLimiter, IOContext.UsageContext)
Sets the rate limiter to be used to limit (approx) MB/sec allowed by all IO
performed with the given context (IOContext.null
to
have no limit.
Passing an instance of rate limiter compared to setting it using SetMaxWriteMBPerSec(Nullable<Double>, IOContext.UsageContext) allows to use the same limiter instance across several directories globally limiting IO across them.
Declaration
public void SetRateLimiter(RateLimiter mergeWriteRateLimiter, IOContext.UsageContext context)
Parameters
Type | Name | Description |
---|---|---|
Rate |
mergeWriteRateLimiter | |
IOContext. |
context |