public DependentKeyIndex createDependentKeyIndex ( CacheLoaderEngine cacheLoaderEngine , Extractor [ ] keyExtractors , Operation ownerObjectFilter ) { DependentKeyIndex dependentKeyIndex = null ; for ( DependentKeyIndex each : this . dependentKeyIndexes ) { if ( Arrays . equals ( each . getKeyExtractors ( ) , keyExtractors ) ) { dependentKeyIndex = each ; break ; } } if ( dependentKeyIndex == null ) { dependentKeyIndex = ( keyExtractors . length > 1 ) ? new DependentTupleKeyIndex ( cacheLoaderEngine , this , keyExtractors ) : new DependentSingleKeyIndex ( cacheLoaderEngine , this , keyExtractors ) ; dependentKeyIndex . setOwnerObjectFilter ( ownerObjectFilter ) ; final LoadingTaskThreadPoolHolder threadPoolHolder = cacheLoaderEngine . getOrCreateThreadPool ( this . getThreadPoolName ( ) ) ; dependentKeyIndex . setLoadingTaskThreadPoolHolder ( threadPoolHolder ) ; threadPoolHolder . addDependentKeyIndex ( dependentKeyIndex ) ; this . dependentKeyIndexes . add ( dependentKeyIndex ) ; } else { dependentKeyIndex . orOwnerObjectFilter ( ownerObjectFilter ) ; } return dependentKeyIndex ; }
executed from a single thread during the cacheloader startup .