public static Collection<Timer> findTimersByBeanId(BeanId beanId, ContainerTx tx) // F743-425.CodRev
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "findTimersByBeanId: " + beanId);

        int numActive = 0;
        ArrayList<Timer> timers = new ArrayList<Timer>();

        // Search the active timers for all timer taskIDs associated with the given beanId.
        synchronized (svActiveTimers) // F743-425.CodRev
        {
            for (TimerNpImpl npTimer : svActiveTimers.values())
            {
                if (npTimer.ivBeanId.equals(beanId))
                {
                    timers.add(npTimer);
                }
            }
            numActive = svActiveTimers.size(); // for trace
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "findTimersByBeanId: " + timers.size() + "(of " + numActive + " active)");

        return timers;
    }
public static Collection < Timer > findTimersByBeanId ( BeanId beanId , ContainerTx tx ) { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "findTimersByBeanId: " + beanId ) ; int numActive = 0 ; ArrayList < Timer > timers = new ArrayList < Timer > ( ) ; synchronized ( svActiveTimers ) { for ( TimerNpImpl npTimer : svActiveTimers . values ( ) ) { if ( npTimer . ivBeanId . equals ( beanId ) ) { timers . add ( npTimer ) ; } } numActive = svActiveTimers . size ( ) ; } if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . exit ( tc , "findTimersByBeanId: " + timers . size ( ) + "(of " + numActive + " active)" ) ; return timers ; }
Returns a collection of all active Timers associated with the specified
BeanId. (It does not look for timers queued to start or on a cancelled queue)<p>

@param beanId Bean identity for which active Timers will be returned.

@return a collection of Timers associated with the specified bean Id.