   Returns x."
   [x]
   (when (instance? ReferenceCounted x)
-    (.retain x))
+    (.retain ^ReferenceCounted x))
   x)
 
 (defmacro channel-initializer

        clojure.tools.logging)
  (:require [riemann.query       :as query])
  (:import
    (java.util.concurrent TimeUnit
                          Executors)
    (com.aphyr.riemann Proto$Msg)
    (io.netty.channel ChannelInitializer
                      Channel
                      ChannelHandler)
    (io.netty.channel.group ChannelGroup
                            DefaultChannelGroup)

  "A decoder that turns DatagramPackets into ByteBufs."
  []
  (proxy [MessageToMessageDecoder] []
    (decode [context ^DatagramPacket message ^List out]
      (.add out (retain (.content message))))

    (isSharable [] true)))
