[infinispan-commits] Infinispan SVN: r2637 - in trunk/server: hotrod/src/main/scala/org/infinispan/server/hotrod and 1 other directory.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Fri Oct 29 09:04:51 EDT 2010


Author: galder.zamarreno at jboss.com
Date: 2010-10-29 09:04:51 -0400 (Fri, 29 Oct 2010)
New Revision: 2637

Modified:
   trunk/server/core/src/main/scala/org/infinispan/server/core/AbstractProtocolServer.scala
   trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/HotRodServer.scala
Log:
ISPN-737 - Provide logging of informational messages for server modules - Merge from 4.2.x revs 2634 and 2635

Modified: trunk/server/core/src/main/scala/org/infinispan/server/core/AbstractProtocolServer.scala
===================================================================
--- trunk/server/core/src/main/scala/org/infinispan/server/core/AbstractProtocolServer.scala	2010-10-29 13:01:37 UTC (rev 2636)
+++ trunk/server/core/src/main/scala/org/infinispan/server/core/AbstractProtocolServer.scala	2010-10-29 13:04:51 UTC (rev 2637)
@@ -7,7 +7,6 @@
 import org.infinispan.manager.EmbeddedCacheManager
 import org.infinispan.server.core.Main._
 import java.util.Properties
-import org.infinispan.util.logging.Log
 import org.infinispan.util.{TypedProperties, Util}
 
 /**
@@ -16,7 +15,7 @@
  * @author Galder Zamarreño
  * @since 4.1
  */
-abstract class AbstractProtocolServer(threadNamePrefix: String) extends ProtocolServer {
+abstract class AbstractProtocolServer(threadNamePrefix: String) extends ProtocolServer with Logging {
    protected var host: String = _
    protected var port: Int = _
    protected var masterThreads: Int = _
@@ -58,6 +57,12 @@
             throw new IllegalArgumentException("Send buffer size can't be lower than 0: " + sendBufSize)
          }
 
+         if (isDebugEnabled) {
+            debug("Starting server with basic settings: host={0}, port={1}, masterThreads={2}, workerThreads={3}, " +
+                  "idleTimeout={4}, tcpNoDelay={5}, sendBufSize={6}, recvBufSize={7}", host, port,
+                  masterThreads, workerThreads, idleTimeout, tcpNoDelay, sendBufSize, recvBufSize)
+         }
+
          // Register rank calculator before starting any cache so that we can capture all view changes
          cacheManager.addListener(getRankCalculatorListener)
          // Start default cache
@@ -83,8 +88,15 @@
    }
 
    override def stop {
+      val isDebug = isDebugEnabled
+      if (isDebug)
+         debug("Stopping server listening in {0}:{1}", host, port)
+
       if (transport != null)
          transport.stop
+
+      if (isDebug)
+         debug("Server stopped")
    }
 
    def getCacheManager = cacheManager

Modified: trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/HotRodServer.scala
===================================================================
--- trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/HotRodServer.scala	2010-10-29 13:01:37 UTC (rev 2636)
+++ trunk/server/hotrod/src/main/scala/org/infinispan/server/hotrod/HotRodServer.scala	2010-10-29 13:04:51 UTC (rev 2637)
@@ -56,6 +56,9 @@
       if (isClustered) {
          val externalHost = typedProps.getProperty(PROP_KEY_PROXY_HOST, getHost)
          val externalPort = typedProps.getIntProperty(PROP_KEY_PROXY_PORT, getPort)
+         if (isDebugEnabled)
+            debug("Externally facing address is {0}:{1}", externalHost, externalPort)
+
          addSelfToTopologyView(externalHost, externalPort, cacheManager)
       }
 



More information about the infinispan-commits mailing list