Permalink
Browse files

use case class for message to reduce memory overhead

  • Loading branch information...
1 parent d7d9084 commit bc3c4c2bd8ed726ff99305f15856d6a428b8d9c2 @p3t0r committed Oct 21, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/scala/com/evrl/underground/IncomingMessage.scala
@@ -7,8 +7,8 @@ import com.lmax.disruptor.EventFactory
// ring, we just shove in the bytes from the wire, to be interpreted later. If
// we want, later on, message parsing can be part of the ring buffer's processing
// pipeline (will put another core to good use :-))
-class IncomingMessage(var data : Array[Byte])
+case class IncomingMessage(var data : Array[Byte])
object IncomingMessageFactory extends EventFactory[IncomingMessage]{
- def newInstance() = new IncomingMessage(null)
+ def newInstance() = IncomingMessage(null)
}

0 comments on commit bc3c4c2

Please sign in to comment.