ThreadGroup getThreadGroup ( String identifier , String threadFactoryName , ThreadGroup parentGroup ) { ConcurrentHashMap < String , ThreadGroup > threadFactoryToThreadGroup = metadataIdentifierToThreadGroups . get ( identifier ) ; if ( threadFactoryToThreadGroup == null ) if ( metadataIdentifierService . isMetaDataAvailable ( identifier ) ) { threadFactoryToThreadGroup = new ConcurrentHashMap < String , ThreadGroup > ( ) ; ConcurrentHashMap < String , ThreadGroup > added = metadataIdentifierToThreadGroups . putIfAbsent ( identifier , threadFactoryToThreadGroup ) ; if ( added != null ) threadFactoryToThreadGroup = added ; } else throw new IllegalStateException ( identifier . toString ( ) ) ; ThreadGroup group = threadFactoryToThreadGroup . get ( threadFactoryName ) ; if ( group == null ) group = AccessController . doPrivileged ( new CreateThreadGroupIfAbsentAction ( parentGroup , threadFactoryName , identifier , threadFactoryToThreadGroup ) , serverAccessControlContext ) ; return group ; }
Returns the thread group to use for the specified application component .