/// <inheritdoc /> protected override Task <PlaceFileResult> PlaceFileCoreAsync( OperationContext operationContext, ContentHash contentHash, AbsolutePath path, FileAccessMode accessMode, FileReplacementMode replacementMode, FileRealizationMode realizationMode, UrgencyHint urgencyHint, Counter retryCounter) { return(Store.PlaceFileAsync(operationContext, contentHash, path, accessMode, replacementMode, realizationMode, MakePinRequest())); }
protected async Task Replicate(IContentStoreInternal store, ContentHash contentHash, DisposableDirectory directory, int numberOfFiles = 1500) { // ReSharper disable once UnusedVariable foreach (var x in Enumerable.Range(0, numberOfFiles)) { var result = await store.PlaceFileAsync( Context, contentHash, directory.CreateRandomFileName(), FileAccessMode.ReadOnly, FileReplacementMode.FailIfExists, FileRealizationMode.HardLink); result.Code.Should().Be(PlaceFileResult.ResultCode.PlacedWithHardLink); Clock.Increment(); } }