internal virtual IndexProxy CreateFailedIndexProxy(StoreIndexDescriptor descriptor, IndexPopulationFailure populationFailure) { // Note about the buffer factory instantiation here. Question is why an index populator is instantiated for a failed index proxy to begin with. // The byte buffer factory should not be used here anyway so the buffer size doesn't actually matter. IndexPopulator indexPopulator = PopulatorFromProvider(descriptor, _samplingConfig, heapBufferFactory(1024)); CapableIndexDescriptor capableIndexDescriptor = _providerMap.withCapabilities(descriptor); string indexUserDescription = indexUserDescription(descriptor); IndexProxy proxy; proxy = new FailedIndexProxy(capableIndexDescriptor, indexUserDescription, indexPopulator, populationFailure, new IndexCountsRemover(_storeView, descriptor.Id), _logProvider); proxy = new ContractCheckingIndexProxy(proxy, true); return(proxy); }
internal virtual IndexProxy CreateOnlineIndexProxy(StoreIndexDescriptor descriptor) { try { IndexAccessor onlineAccessor = OnlineAccessorFromProvider(descriptor, _samplingConfig); CapableIndexDescriptor capableIndexDescriptor = _providerMap.withCapabilities(descriptor); IndexProxy proxy; proxy = new OnlineIndexProxy(capableIndexDescriptor, onlineAccessor, _storeView, false); proxy = new ContractCheckingIndexProxy(proxy, true); return(proxy); } catch (IOException e) { _logProvider.getLog(this.GetType()).error("Failed to open index: " + descriptor.Id + " (" + descriptor.UserDescription(_tokenNameLookup) + "), requesting re-population.", e); return(CreateRecoveringIndexProxy(descriptor)); } }
public DelegatingIndexUpdaterAnonymousInnerClass(ContractCheckingIndexProxy outerInstance, IndexUpdater newUpdater) : base(newUpdater) { this.outerInstance = outerInstance; }