Exemplo n.º 1
0
 /// <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)
 {
 }
Exemplo n.º 2
0
 /// <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)
 {
 }
Exemplo n.º 3
0
 /// <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)
 {
 }
Exemplo n.º 4
0
 /// <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)
 {
 }
Exemplo n.º 5
0
 /// <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 &lt;&lt; 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)
 {
 }
Exemplo n.º 6
0
 public override void SetLockFactory(LockFactory lockFactory)
 {
     @delegate.SetLockFactory(lockFactory);
 }
Exemplo n.º 7
0
 /// <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)
 {
 }
Exemplo n.º 8
0
 /// <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));
 }
Exemplo n.º 9
0
 /// <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);
Exemplo n.º 10
0
 /// <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;
 }
Exemplo n.º 11
0
 public override void SetLockFactory(LockFactory lockFactory)
 {
     Debug.Assert(lockFactory != null);
     this.m_lockFactory     = lockFactory;
     lockFactory.LockPrefix = this.GetLockID();
 }
Exemplo n.º 12
0
 public override void SetLockFactory(LockFactory lockFactory)
 {
     m_input.SetLockFactory(lockFactory);
 }