/// <summary> /// Create a new <see cref="NIOFSDirectory"/> for the named location. /// <para/> /// LUCENENET specific overload for convenience using string instead of <see cref="DirectoryInfo"/>. /// </summary> /// <param name="path"> the path of the directory </param> /// <param name="lockFactory"> the lock factory to use, or null for the default /// (<see cref="NativeFSLockFactory"/>); </param> /// <exception cref="IOException"> if there is a low-level I/O error </exception> public NIOFSDirectory(string path, LockFactory lockFactory) : this(new DirectoryInfo(path), lockFactory) { }
/// <summary> /// Create a new <see cref="MMapDirectory"/> for the named location. /// </summary> /// <param name="path"> the path of the directory </param> /// <param name="lockFactory"> the lock factory to use, or null for the default /// (<see cref="NativeFSLockFactory"/>); </param> /// <exception cref="IOException"> if there is a low-level I/O error </exception> public MMapDirectory(DirectoryInfo path, LockFactory lockFactory) : this(path, lockFactory, DEFAULT_MAX_BUFF) { }
/// <summary> /// Create a new <see cref="NIOFSDirectory"/> for the named location. /// </summary> /// <param name="path"> the path of the directory </param> /// <param name="lockFactory"> the lock factory to use, or null for the default /// (<see cref="NativeFSLockFactory"/>); </param> /// <exception cref="IOException"> if there is a low-level I/O error </exception> public NIOFSDirectory(DirectoryInfo path, LockFactory lockFactory) : base(path, lockFactory) { }
/// <summary> /// Create a new <see cref="MMapDirectory"/> for the named location. /// <para/> /// LUCENENET specific overload for convenience using string instead of <see cref="DirectoryInfo"/>. /// </summary> /// <param name="path"> the path of the directory </param> /// <param name="lockFactory"> the lock factory to use, or null for the default /// (<see cref="NativeFSLockFactory"/>); </param> /// <exception cref="IOException"> if there is a low-level I/O error </exception> public MMapDirectory(string path, LockFactory lockFactory) : this(path, lockFactory, DEFAULT_MAX_BUFF) { }
/// <summary> /// Create a new <see cref="MMapDirectory"/> for the named location, specifying the /// maximum chunk size used for memory mapping. /// <para/> /// LUCENENET specific overload for convenience using string instead of <see cref="DirectoryInfo"/>. /// </summary> /// <param name="path"> the path of the directory </param> /// <param name="lockFactory"> the lock factory to use, or <c>null</c> for the default /// (<see cref="NativeFSLockFactory"/>); </param> /// <param name="maxChunkSize"> maximum chunk size (default is 1 GiBytes for /// 64 bit runtimes and 256 MiBytes for 32 bit runtimes) used for memory mapping. /// <para/> /// Especially on 32 bit platform, the address space can be very fragmented, /// so large index files cannot be mapped. Using a lower chunk size makes /// the directory implementation a little bit slower (as the correct chunk /// may be resolved on lots of seeks) but the chance is higher that mmap /// does not fail. On 64 bit platforms, this parameter should always /// be <c>1 << 30</c>, as the address space is big enough. /// <para/> /// <b>Please note:</b> The chunk size is always rounded down to a power of 2. /// </param> /// <exception cref="IOException"> if there is a low-level I/O error </exception> public MMapDirectory(string path, LockFactory lockFactory, int maxChunkSize) : this(new DirectoryInfo(path), lockFactory, maxChunkSize) { }
public override void SetLockFactory(LockFactory lockFactory) { @delegate.SetLockFactory(lockFactory); }
/// <summary> /// Create a new <see cref="SimpleFSDirectory"/> for the named location. /// </summary> /// <param name="path"> the path of the directory </param> /// <param name="lockFactory"> the lock factory to use, or null for the default /// (<see cref="NativeFSLockFactory"/>); </param> /// <exception cref="IOException"> if there is a low-level I/O error </exception> public SimpleFSDirectory(DirectoryInfo path, LockFactory lockFactory) : base(path, lockFactory) { }
/// <summary> /// Just like <see cref="Open(DirectoryInfo, LockFactory)"/>, but /// allows you to specify the directory as a <see cref="string"/>. /// </summary> /// <param name="path">The path (to a directory) to open</param> /// <param name="lockFactory"></param> /// <returns>An open <see cref="FSDirectory"/></returns> public static FSDirectory Open(string path, LockFactory lockFactory) // LUCENENET specific overload for ease of use with .NET { return(Open(new DirectoryInfo(path), lockFactory)); }
/// <summary> /// Set the <see cref="Store.LockFactory"/> that this <see cref="Directory"/> instance should /// use for its locking implementation. Each * instance of /// <see cref="Store.LockFactory"/> should only be used for one directory (ie, /// do not share a single instance across multiple /// Directories). /// </summary> /// <param name="lockFactory"> instance of <see cref="Store.LockFactory"/>. </param> public abstract void SetLockFactory(LockFactory lockFactory);
/// <summary> /// Creates a new <see cref="VerifyingLockFactory"/> instance. /// </summary> /// <param name="lf"> the <see cref="LockFactory"/> that we are testing </param> /// <param name="stream"> the socket's stream input/output to <see cref="LockVerifyServer"/> </param> public VerifyingLockFactory(LockFactory lf, Stream stream) { this.lf = lf; this.stream = stream; }
public override void SetLockFactory(LockFactory lockFactory) { Debug.Assert(lockFactory != null); this.m_lockFactory = lockFactory; lockFactory.LockPrefix = this.GetLockID(); }
public override void SetLockFactory(LockFactory lockFactory) { m_input.SetLockFactory(lockFactory); }