@ SuppressWarnings ( "unchecked" ) public List getAllOutboundConversations ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getAllOutboundConversations" ) ; final List < Conversation > result = new ArrayList < Conversation > ( ) ; final HashMap < EndPointDescriptor , ConnectionDataGroup > endPointToGroupMapClone ; //Clone endPointToGroupMap to minimize amount of time we hold its monitor. synchronized ( endPointToGroupMap ) { endPointToGroupMapClone = ( HashMap < EndPointDescriptor , ConnectionDataGroup > ) endPointToGroupMap . clone ( ) ; } for ( final Iterator groupIterator = endPointToGroupMapClone . values ( ) . iterator ( ) ; groupIterator . hasNext ( ) ; ) { final ConnectionDataGroup group = ( ConnectionDataGroup ) groupIterator . next ( ) ; //Don't need to get the monitor of ConnectionDataGroup in order to perform this action. final List connectionData = group . getConnections ( ) ; for ( final Iterator connectionDataIterator = connectionData . iterator ( ) ; connectionDataIterator . hasNext ( ) ; ) { final ConnectionData thisConnectionData = ( ConnectionData ) connectionDataIterator . next ( ) ; final Connection connection = thisConnectionData . getConnection ( ) ; // Now get all the conversations on the link final Conversation [ ] conversationArray = connection . getConversations ( ) ; for ( Conversation conv : conversationArray ) { if ( conv != null ) result . add ( conv ) ; } } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getAllOutboundConversations" , result ) ; return result ; }
Gets a list of all the active conversations known about by the outbound connection tracker .