private void handleQueueParamsEvent ( QueueParamsEvent event ) { AsteriskQueueImpl queue ; final String name = event . getQueue ( ) ; final Integer max = event . getMax ( ) ; final String strategy = event . getStrategy ( ) ; final Integer serviceLevel = event . getServiceLevel ( ) ; final Integer weight = event . getWeight ( ) ; final Integer calls = event . getCalls ( ) ; final Integer holdTime = event . getHoldTime ( ) ; final Integer talkTime = event . getTalkTime ( ) ; final Integer completed = event . getCompleted ( ) ; final Integer abandoned = event . getAbandoned ( ) ; final Double serviceLevelPerf = event . getServiceLevelPerf ( ) ; queue = getInternalQueueByName ( name ) ; if ( queue == null ) { queue = new AsteriskQueueImpl ( server , name , max , strategy , serviceLevel , weight , calls , holdTime , talkTime , completed , abandoned , serviceLevelPerf ) ; logger . info ( "Adding new queue " + queue ) ; addQueue ( queue ) ; } else { // We should never reach that code as this method is only called for // initialization // So the queue should never be in the queues list synchronized ( queue ) { synchronized ( queuesLRU ) { if ( queue . setMax ( max ) | queue . setServiceLevel ( serviceLevel ) | queue . setWeight ( weight ) | queue . setCalls ( calls ) | queue . setHoldTime ( holdTime ) | queue . setTalkTime ( talkTime ) | queue . setCompleted ( completed ) | queue . setAbandoned ( abandoned ) | queue . setServiceLevelPerf ( serviceLevelPerf ) ) { queuesLRU . remove ( queue . getName ( ) ) ; queuesLRU . put ( queue . getName ( ) , queue ) ; } } } } }
Called during initialization to populate the list of queues .