public void prime() {
        ThreadInfo[] ti = threading.dumpAllThreads(false, false);
        long[] tids = new long[ti.length];
        int n = 0;
        for(ThreadInfo t:ti) {
            long tid = t.getThreadId();
            String name = t.getThreadName();
            if (threadFilter == null || threadFilter.accept(name)) {
                tids[n++] = tid;
            }
        }
        tids = Arrays.copyOf(tids, n);
        threadSet = tids;
	}
public void prime ( ) { ThreadInfo [ ] ti = threading . dumpAllThreads ( false , false ) ; long [ ] tids = new long [ ti . length ] ; int n = 0 ; for ( ThreadInfo t : ti ) { long tid = t . getThreadId ( ) ; String name = t . getThreadName ( ) ; if ( threadFilter == null || threadFilter . accept ( name ) ) { tids [ n ++ ] = tid ; } } tids = Arrays . copyOf ( tids , n ) ; threadSet = tids ; }
Find threads according to thread name filters and memorise their IDs.
<br/>
Optional method to avoid dump all threads at every collection.