/// <summary> /// Create a SyncDirectory /// </summary> /// <param name="masterDirectory"></param> /// <param name="cacheDirectory">local Directory object to use for local cache</param> public SyncDirectory( Lucene.Net.Store.Directory masterDirectory, Lucene.Net.Store.Directory cacheDirectory) { if (masterDirectory == null) throw new ArgumentNullException(nameof(masterDirectory)); if (cacheDirectory == null) throw new ArgumentNullException(nameof(cacheDirectory)); _masterDirectory = masterDirectory; _cacheDirectory = cacheDirectory; _lockFactory = new MultiIndexLockFactory(_masterDirectory, _cacheDirectory); }
/// <summary> /// Create a SyncDirectory /// </summary> /// <param name="masterDirectory"></param> /// <param name="cacheDirectory">local Directory object to use for local cache</param> public SyncDirectory( Lucene.Net.Store.Directory masterDirectory, Lucene.Net.Store.Directory cacheDirectory) { if (masterDirectory == null) { throw new ArgumentNullException(nameof(masterDirectory)); } if (cacheDirectory == null) { throw new ArgumentNullException(nameof(cacheDirectory)); } _masterDirectory = masterDirectory; _cacheDirectory = cacheDirectory; _lockFactory = new MultiIndexLockFactory(_masterDirectory, _cacheDirectory); }