This isn't thread-safe, since channelMap modified without locking; if two threads call getAllChannels(), then one may clear the map whilst the other is put()ting