C# 클래스 Lucene.Net.Util.FieldCacheSanityChecker

Provides methods for sanity checking that entries in the FieldCache are not wasteful or inconsistent.

Lucene 2.9 Introduced numerous enhancements into how the FieldCache is used by the low levels of Lucene searching (for Sorting and ValueSourceQueries) to improve both the speed for Sorting, as well as reopening of IndexReaders. But these changes have shifted the usage of FieldCache from "top level" IndexReaders (frequently a MultiReader or DirectoryReader) down to the leaf level SegmentReaders. As a result, existing applications that directly access the FieldCache may find RAM usage increase significantly when upgrading to 2.9 or Later. this class provides an API for these applications (or their Unit tests) to check at run time if the FieldCache contains "insane" usages of the FieldCache.

@lucene.experimental
파일 보기 프로젝트 열기: apache/lucenenet 1 사용 예제들

공개 메소드들

메소드 설명
Check ( ) : Insanity[]

Tests a CacheEntry[] for indication of "insane" cache usage.

NOTE:FieldCache CreationPlaceholder objects are ignored. (:TODO: is this a bad idea? are we masking a real problem?)

CheckSanity ( ) : Insanity[]

Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the CacheEntrys

CheckSanity ( IFieldCache cache ) : Insanity[]

Quick and dirty convenience method

FieldCacheSanityChecker ( ) : System.Collections.Generic

비공개 메소드들

메소드 설명
CheckSubreaders ( FieldCache.CacheEntry>.MapOfSets valIdToItems, int>.MapOfSets readerFieldToValIds ) : ICollection

Internal helper method used by check that iterates over the keys of readerFieldToValIds and generates a Collection of Insanity instances whenever two (or more) ReaderField instances are found that have an ancestry relationships.

CheckValueMismatch ( FieldCache.CacheEntry>.MapOfSets valIdToItems, int>.MapOfSets readerFieldToValIds, ISet valMismatchKeys ) : ICollection

Internal helper method used by check that iterates over valMismatchKeys and generates a Collection of Insanity instances accordingly. The MapOfSets are used to populate the Insanity objects.

GetAllDescendantReaderKeys ( object seed ) : IList

Checks if the seed is an IndexReader, and if so will walk the hierarchy of subReaders building up a list of the objects returned by {@code seed.getCoreCacheKey()}

메소드 상세

Check() 공개 메소드

Tests a CacheEntry[] for indication of "insane" cache usage.

NOTE:FieldCache CreationPlaceholder objects are ignored. (:TODO: is this a bad idea? are we masking a real problem?)

public Check ( ) : Insanity[]
리턴 Insanity[]

CheckSanity() 공개 정적인 메소드

Quick and dirty convenience method that instantiates an instance with "good defaults" and uses it to test the CacheEntrys
public static CheckSanity ( ) : Insanity[]
리턴 Insanity[]

CheckSanity() 공개 정적인 메소드

Quick and dirty convenience method
public static CheckSanity ( IFieldCache cache ) : Insanity[]
cache IFieldCache
리턴 Insanity[]

FieldCacheSanityChecker() 공개 메소드

public FieldCacheSanityChecker ( ) : System.Collections.Generic
리턴 System.Collections.Generic