protected Map < Object , LinkedList < Conversation > > convertToMap ( final IncidentStream is , final List obc ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "convertToMap" , new Object [ ] { is , obc } ) ; final Map < Object , LinkedList < Conversation > > connectionToConversationMap = new HashMap < Object , LinkedList < Conversation > > ( ) ; for ( Iterator i = obc . iterator ( ) ; i . hasNext ( ) ; ) { try { final Conversation c = ( Conversation ) i . next ( ) ; final Object connectionObject = c . getConnectionReference ( ) ; final LinkedList < Conversation > conversationList ; if ( ! connectionToConversationMap . containsKey ( connectionObject ) ) { conversationList = new LinkedList < Conversation > ( ) ; connectionToConversationMap . put ( connectionObject , conversationList ) ; } else { conversationList = connectionToConversationMap . get ( connectionObject ) ; } conversationList . add ( c ) ; } catch ( Throwable t ) { // No FFDC Code Needed is . writeLine ( "\nUnable to dump conversation" , t ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "convertToMap" , connectionToConversationMap ) ; return connectionToConversationMap ; }
Generates a set of mappings between a Connection and the Conversations which are making use of it .