svn commit: r661225 - in /activemq/camel/trunk/components/camel-scala/src: main/scala/org/apache/camel/scala/dsl/SResequencerType.scala test/scala/org/apache/camel/scala/dsl/ResequencerTest.scala

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r661225 - in /activemq/camel/trunk/components/camel-scala/src: main/scala/org/apache/camel/scala/dsl/SResequencerType.scala test/scala/org/apache/camel/scala/dsl/ResequencerTest.scala

gertv-2
Author: gertv
Date: Wed May 28 23:43:15 2008
New Revision: 661225

URL: http://svn.apache.org/viewvc?rev=661225&view=rev
Log:
CAMEL-463: Adding resequencer support

Modified:
    activemq/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SResequencerType.scala
    activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/ResequencerTest.scala

Modified: activemq/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SResequencerType.scala
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SResequencerType.scala?rev=661225&r1=661224&r2=661225&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SResequencerType.scala (original)
+++ activemq/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SResequencerType.scala Wed May 28 23:43:15 2008
@@ -17,12 +17,18 @@
 package org.apache.camel.scala.dsl;
 
 import org.apache.camel.model.ResequencerType
+import org.apache.camel.model.config.BatchResequencerConfig
 import org.apache.camel.scala.builder.RouteBuilder
 
 class SResequencerType(val target: ResequencerType)(implicit val builder: RouteBuilder) extends ScalaDsl with Wrapper[ResequencerType] {
   
   val unwrap = target
   
-  def batch(count: Int) = this
+  def batch(count: Int) = {
+    val config = new BatchResequencerConfig()
+    config.setBatchSize(count)
+    target.batch(config)
+    this
+  }
 
 }

Modified: activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/ResequencerTest.scala
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/ResequencerTest.scala?rev=661225&r1=661224&r2=661225&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/ResequencerTest.scala (original)
+++ activemq/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/ResequencerTest.scala Wed May 28 23:43:15 2008
@@ -70,7 +70,7 @@
        //START SNIPPET: batch
        "direct:d" ==> {
          to ("mock:d")
-         resequence (_.in) batch(1) apply {
+         resequence (_.in) batch(5) apply {
            to ("mock:e")
          }
        }