private Integer getChannelForSymbol ( final BitfinexStreamSymbol symbol ) { synchronized ( channelIdToHandlerMap ) { return channelIdToHandlerMap . values ( ) . stream ( ) . filter ( v -> Objects . equals ( v . getSymbol ( ) , symbol ) ) . map ( ChannelCallbackHandler :: getChannelId ) . findFirst ( ) . orElse ( null ) ; } }
Find the channel for the given symbol