public HollowHashIndexResult findMatches ( Object ... query ) { int hashCode = 0 ; for ( int i = 0 ; i < query . length ; i ++ ) { if ( query [ i ] == null ) throw new IllegalArgumentException ( "querying by null unsupported; i=" + i ) ; hashCode ^= HashCodes . hashInt ( keyHashCode ( query [ i ] , i ) ) ; } HollowHashIndexResult result ; HollowHashIndexState hashState ; do { result = null ; hashState = hashStateVolatile ; long bucket = hashCode & hashState . getMatchHashMask ( ) ; long hashBucketBit = bucket * hashState . getBitsPerMatchHashEntry ( ) ; boolean bucketIsEmpty = hashState . getMatchHashTable ( ) . getElementValue ( hashBucketBit , hashState . getBitsPerTraverserField ( ) [ 0 ] ) == 0 ; while ( ! bucketIsEmpty ) { if ( matchIsEqual ( hashState . getMatchHashTable ( ) , hashBucketBit , query ) ) { int selectSize = ( int ) hashState . getMatchHashTable ( ) . getElementValue ( hashBucketBit + hashState . getBitsPerMatchHashKey ( ) , hashState . getBitsPerSelectTableSize ( ) ) ; long selectBucketPointer = hashState . getMatchHashTable ( ) . getElementValue ( hashBucketBit + hashState . getBitsPerMatchHashKey ( ) + hashState . getBitsPerSelectTableSize ( ) , hashState . getBitsPerSelectTablePointer ( ) ) ; result = new HollowHashIndexResult ( hashState , selectBucketPointer , selectSize ) ; break ; } bucket = ( bucket + 1 ) & hashState . getMatchHashMask ( ) ; hashBucketBit = bucket * hashState . getBitsPerMatchHashEntry ( ) ; bucketIsEmpty = hashState . getMatchHashTable ( ) . getElementValue ( hashBucketBit , hashState . getBitsPerTraverserField ( ) [ 0 ] ) == 0 ; } } while ( hashState != hashStateVolatile ) ; return result ; }
Query the index .