public static void disableCategories ( Category ... categories ) { final VoltTrace tracer = s_tracer ; if ( tracer == null ) { return ; } final List < Category > toDisable = Arrays . asList ( categories ) ; final ImmutableSet . Builder < Category > builder = ImmutableSet . builder ( ) ; for ( Category enabledCategory : tracer . m_enabledCategories ) { if ( ! toDisable . contains ( enabledCategory ) ) { builder . add ( enabledCategory ) ; } } final ImmutableSet < Category > enabledCategories = builder . build ( ) ; if ( enabledCategories . isEmpty ( ) ) { // All categories disabled, shutdown tracer try { closeAllAndShutdown ( null , 0 ) ; } catch ( IOException e ) { } } else { tracer . m_enabledCategories = enabledCategories ; } }
Disable the given categories . If the tracer has no enabled category after this call shutdown the tracer .