activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1305913 - in /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker: Router.scala Sink.scala
Date Tue, 27 Mar 2012 17:29:32 GMT
Author: chirino
Date: Tue Mar 27 17:29:32 2012
New Revision: 1305913

URL: http://svn.apache.org/viewvc?rev=1305913&view=rev
Log:
Convert the Sink interface to an abstract base class since invoking virtual methods is sightly
more efficient than invoking interface methods.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala?rev=1305913&r1=1305912&r2=1305913&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
Tue Mar 27 17:29:32 2012
@@ -203,9 +203,14 @@ object DeliveryProducerRoute extends Log
 /**
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
  */
-abstract class DeliveryProducerRoute(router:Router) extends BaseRetained with BindableDeliveryProducer
with Sink[Delivery] {
+abstract class DeliveryProducerRoute(router:Router) extends Sink[Delivery] with BindableDeliveryProducer
{
   import DeliveryProducerRoute._
 
+  val reained_base = new BaseRetained
+  def release = reained_base.release
+  def retain = reained_base.retain
+  def retained = reained_base.retained
+
   var targets = List[DeliverySession]()
   val store = if(router!=null) {
     router.virtual_host.store

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala?rev=1305913&r1=1305912&r2=1305913&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Sink.scala
Tue Mar 27 17:29:32 2012
@@ -28,7 +28,7 @@ import collection.mutable.HashSet
  * <p>
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
  */
-trait Sink[T] {
+abstract class Sink[T] {
 
   /**
    * @return true if the sink is full



Mime
View raw message