Fixes ticket #1809 - Harmonize configuration option names.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
This commit is contained in:
Jonas Bonér 2012-02-09 20:40:09 +01:00
parent 34d9714e22
commit 51a218b87f
21 changed files with 62 additions and 63 deletions

View file

@ -29,10 +29,10 @@ class ConfigSpec extends AkkaSpec(ConfigFactory.defaultReference) {
getBoolean("akka.actor.serialize-messages") must equal(false) getBoolean("akka.actor.serialize-messages") must equal(false)
settings.SerializeAllMessages must equal(false) settings.SerializeAllMessages must equal(false)
getInt("akka.scheduler.ticksPerWheel") must equal(512) getInt("akka.scheduler.ticks-per-wheel") must equal(512)
settings.SchedulerTicksPerWheel must equal(512) settings.SchedulerTicksPerWheel must equal(512)
getMilliseconds("akka.scheduler.tickDuration") must equal(100) getMilliseconds("akka.scheduler.tick-duration") must equal(100)
settings.SchedulerTickDuration must equal(100 millis) settings.SchedulerTickDuration must equal(100 millis)
settings.Daemonicity must be(false) settings.Daemonicity must be(false)
@ -49,7 +49,7 @@ class ConfigSpec extends AkkaSpec(ConfigFactory.defaultReference) {
c.getString("executor") must equal("fork-join-executor") c.getString("executor") must equal("fork-join-executor")
c.getInt("mailbox-capacity") must equal(-1) c.getInt("mailbox-capacity") must equal(-1)
c.getMilliseconds("mailbox-push-timeout-time") must equal(10 * 1000) c.getMilliseconds("mailbox-push-timeout-time") must equal(10 * 1000)
c.getString("mailboxType") must be("") c.getString("mailbox-type") must be("")
c.getMilliseconds("shutdown-timeout") must equal(1 * 1000) c.getMilliseconds("shutdown-timeout") must equal(1 * 1000)
c.getInt("throughput") must equal(5) c.getInt("throughput") must equal(5)
c.getMilliseconds("throughput-deadline-time") must equal(0) c.getMilliseconds("throughput-deadline-time") must equal(0)

View file

@ -153,7 +153,7 @@ class PriorityMailboxSpec extends MailboxSpec {
object CustomMailboxSpec { object CustomMailboxSpec {
val config = """ val config = """
my-dispatcher { my-dispatcher {
mailboxType = "akka.dispatch.CustomMailboxSpec$MyMailboxType" mailbox-type = "akka.dispatch.CustomMailboxSpec$MyMailboxType"
} }
""" """

View file

@ -10,10 +10,10 @@ import com.typesafe.config.Config
object PriorityDispatcherSpec { object PriorityDispatcherSpec {
val config = """ val config = """
unbounded-prio-dispatcher { unbounded-prio-dispatcher {
mailboxType = "akka.dispatch.PriorityDispatcherSpec$Unbounded" mailbox-type = "akka.dispatch.PriorityDispatcherSpec$Unbounded"
} }
bounded-prio-dispatcher { bounded-prio-dispatcher {
mailboxType = "akka.dispatch.PriorityDispatcherSpec$Bounded" mailbox-type = "akka.dispatch.PriorityDispatcherSpec$Bounded"
} }
""" """

View file

@ -26,7 +26,7 @@ akka {
# Log the complete configuration at INFO level when the actor system is started. # Log the complete configuration at INFO level when the actor system is started.
# This is useful when you are uncertain of what configuration is used. # This is useful when you are uncertain of what configuration is used.
logConfigOnStart = off log-config-on-start = off
# List FQCN of extensions which shall be loaded at actor system startup. # List FQCN of extensions which shall be loaded at actor system startup.
# Should be on the format: 'extensions = ["foo", "bar"]' etc. # Should be on the format: 'extensions = ["foo", "bar"]' etc.
@ -37,7 +37,7 @@ akka {
daemonic = off daemonic = off
# JVM shutdown, System.exit(-1), in case of a fatal error, such as OutOfMemoryError # JVM shutdown, System.exit(-1), in case of a fatal error, such as OutOfMemoryError
jvmExitOnFatalError = on jvm-exit-on-fatal-error = on
actor { actor {
@ -185,37 +185,37 @@ akka {
# This will be used if you have set "executor = "thread-pool-executor"" # This will be used if you have set "executor = "thread-pool-executor""
thread-pool-executor { thread-pool-executor {
# Keep alive time for threads # Keep alive time for threads
keep-alive-time = 60s keep-alive-time = 60s
# Min number of threads to cap factor-based core number to # Min number of threads to cap factor-based core number to
core-pool-size-min = 8 core-pool-size-min = 8
# No of core threads ... ceil(available processors * factor) # No of core threads ... ceil(available processors * factor)
core-pool-size-factor = 3.0 core-pool-size-factor = 3.0
# Max number of threads to cap factor-based number to # Max number of threads to cap factor-based number to
core-pool-size-max = 64 core-pool-size-max = 64
# Hint: max-pool-size is only used for bounded task queues # Hint: max-pool-size is only used for bounded task queues
# minimum number of threads to cap factor-based max number to # minimum number of threads to cap factor-based max number to
max-pool-size-min = 8 max-pool-size-min = 8
# Max no of threads ... ceil(available processors * factor) # Max no of threads ... ceil(available processors * factor)
max-pool-size-factor = 3.0 max-pool-size-factor = 3.0
# Max number of threads to cap factor-based max number to # Max number of threads to cap factor-based max number to
max-pool-size-max = 64 max-pool-size-max = 64
# Specifies the bounded capacity of the task queue (< 1 == unbounded) # Specifies the bounded capacity of the task queue (< 1 == unbounded)
task-queue-size = -1 task-queue-size = -1
# Specifies which type of task queue will be used, can be "array" or # Specifies which type of task queue will be used, can be "array" or
# "linked" (default) # "linked" (default)
task-queue-type = "linked" task-queue-type = "linked"
# Allow core threads to time out # Allow core threads to time out
allow-core-timeout = on allow-core-timeout = on
} }
# How long time the dispatcher will wait for new actors until it shuts down # How long time the dispatcher will wait for new actors until it shuts down
@ -245,7 +245,7 @@ akka {
# FQCN of the MailboxType, if not specified the default bounded or unbounded # FQCN of the MailboxType, if not specified the default bounded or unbounded
# mailbox is used. The Class of the FQCN must have a constructor with a # mailbox is used. The Class of the FQCN must have a constructor with a
# com.typesafe.config.Config parameter. # com.typesafe.config.Config parameter.
mailboxType = "" mailbox-type = ""
} }
debug { debug {
@ -272,7 +272,7 @@ akka {
} }
# Class to Serializer binding. You only need to specify the name of an interface # Class to Serializer binding. You only need to specify the name of an interface
# or abstract base class of the messages. In case of ambiguity it is using the # or abstract base class of the messages. In case of ambiguity it is using the
# most specific configured class, or giving a warning and choosing the “first” one. # most specific configured class, or giving a warning and choosing the “first” one.
# #
# To disable one of the default serializers, assign its class to "none", like # To disable one of the default serializers, assign its class to "none", like
@ -294,7 +294,7 @@ akka {
# or larger tick duration. # or larger tick duration.
# If you are scheduling a lot of tasks you should consider increasing the ticks per wheel. # If you are scheduling a lot of tasks you should consider increasing the ticks per wheel.
# For more information see: http://www.jboss.org/netty/ # For more information see: http://www.jboss.org/netty/
tickDuration = 100ms tick-duration = 100ms
ticksPerWheel = 512 ticks-per-wheel = 512
} }
} }

View file

@ -77,7 +77,7 @@ object ActorSystem {
final val LogLevel = getString("akka.loglevel") final val LogLevel = getString("akka.loglevel")
final val StdoutLogLevel = getString("akka.stdout-loglevel") final val StdoutLogLevel = getString("akka.stdout-loglevel")
final val EventHandlers: Seq[String] = getStringList("akka.event-handlers").asScala final val EventHandlers: Seq[String] = getStringList("akka.event-handlers").asScala
final val LogConfigOnStart = config.getBoolean("akka.logConfigOnStart") final val LogConfigOnStart = config.getBoolean("akka.log-config-on-start")
final val AddLoggingReceive = getBoolean("akka.actor.debug.receive") final val AddLoggingReceive = getBoolean("akka.actor.debug.receive")
final val DebugAutoReceive = getBoolean("akka.actor.debug.autoreceive") final val DebugAutoReceive = getBoolean("akka.actor.debug.autoreceive")
final val DebugLifecycle = getBoolean("akka.actor.debug.lifecycle") final val DebugLifecycle = getBoolean("akka.actor.debug.lifecycle")
@ -89,10 +89,10 @@ object ActorSystem {
case x Some(x) case x Some(x)
} }
final val SchedulerTickDuration = Duration(getMilliseconds("akka.scheduler.tickDuration"), MILLISECONDS) final val SchedulerTickDuration = Duration(getMilliseconds("akka.scheduler.tick-duration"), MILLISECONDS)
final val SchedulerTicksPerWheel = getInt("akka.scheduler.ticksPerWheel") final val SchedulerTicksPerWheel = getInt("akka.scheduler.ticks-per-wheel")
final val Daemonicity = getBoolean("akka.daemonic") final val Daemonicity = getBoolean("akka.daemonic")
final val JvmExitOnFatalError = getBoolean("akka.jvmExitOnFatalError") final val JvmExitOnFatalError = getBoolean("akka.jvm-exit-on-fatal-error")
if (ConfigVersion != Version) if (ConfigVersion != Version)
throw new ConfigurationException("Akka JAR version [" + Version + "] does not match the provided config version [" + ConfigVersion + "]") throw new ConfigurationException("Akka JAR version [" + Version + "] does not match the provided config version [" + ConfigVersion + "]")

View file

@ -354,12 +354,12 @@ abstract class MessageDispatcherConfigurator(val config: Config, val prerequisit
/** /**
* Returns a factory for the [[akka.dispatch.Mailbox]] given the configuration. * Returns a factory for the [[akka.dispatch.Mailbox]] given the configuration.
* Default implementation instantiate the [[akka.dispatch.MailboxType]] specified * Default implementation instantiate the [[akka.dispatch.MailboxType]] specified
* as FQCN in mailboxType config property. If mailboxType is unspecified (empty) * as FQCN in mailbox-type config property. If mailbox-type is unspecified (empty)
* then [[akka.dispatch.UnboundedMailbox]] is used when capacity is < 1, * then [[akka.dispatch.UnboundedMailbox]] is used when capacity is < 1,
* otherwise [[akka.dispatch.BoundedMailbox]]. * otherwise [[akka.dispatch.BoundedMailbox]].
*/ */
def mailboxType(): MailboxType = { def mailboxType(): MailboxType = {
config.getString("mailboxType") match { config.getString("mailbox-type") match {
case "" case ""
val capacity = config.getInt("mailbox-capacity") val capacity = config.getInt("mailbox-capacity")
if (capacity < 1) UnboundedMailbox() if (capacity < 1) UnboundedMailbox()

View file

@ -19,6 +19,5 @@ akka {
executor = thread-pool-executor executor = thread-pool-executor
type = PinnedDispatcher type = PinnedDispatcher
} }
} }
} }

View file

@ -26,7 +26,7 @@ akka {
} }
gossip { gossip {
initialDelay = 5s initial-delay = 5s
frequency = 1s frequency = 1s
} }
} }

View file

@ -18,7 +18,7 @@ class ClusterSettings(val config: Config, val systemName: String) {
val FailureDetectorMaxSampleSize = getInt("akka.cluster.failure-detector.max-sample-size") val FailureDetectorMaxSampleSize = getInt("akka.cluster.failure-detector.max-sample-size")
val SeedNodeConnectionTimeout = Duration(config.getMilliseconds("akka.cluster.seed-node-connection-timeout"), MILLISECONDS) val SeedNodeConnectionTimeout = Duration(config.getMilliseconds("akka.cluster.seed-node-connection-timeout"), MILLISECONDS)
val MaxTimeToRetryJoiningCluster = Duration(config.getMilliseconds("akka.cluster.max-time-to-retry-joining-cluster"), MILLISECONDS) val MaxTimeToRetryJoiningCluster = Duration(config.getMilliseconds("akka.cluster.max-time-to-retry-joining-cluster"), MILLISECONDS)
val InitialDelayForGossip = Duration(getMilliseconds("akka.cluster.gossip.initialDelay"), MILLISECONDS) val InitialDelayForGossip = Duration(getMilliseconds("akka.cluster.gossip.initial-delay"), MILLISECONDS)
val GossipFrequency = Duration(getMilliseconds("akka.cluster.gossip.frequency"), MILLISECONDS) val GossipFrequency = Duration(getMilliseconds("akka.cluster.gossip.frequency"), MILLISECONDS)
val SeedNodes = Set.empty[Address] ++ getStringList("akka.cluster.seed-nodes").asScala.collect { val SeedNodes = Set.empty[Address] ++ getStringList("akka.cluster.seed-nodes").asScala.collect {
case AddressExtractor(addr) addr case AddressExtractor(addr) addr

View file

@ -172,12 +172,12 @@ More advanced include and substitution mechanisms are explained in the `HOCON <h
specification. specification.
.. _-Dakka.logConfigOnStart: .. _-Dakka.log-config-on-start:
Logging of Configuration Logging of Configuration
------------------------ ------------------------
If the system or config property ``akka.logConfigOnStart`` is set to ``on``, then the If the system or config property ``akka.log-config-on-start`` is set to ``on``, then the
complete configuration at INFO level when the actor system is started. This is useful complete configuration at INFO level when the actor system is started. This is useful
when you are uncertain of what configuration is used. when you are uncertain of what configuration is used.

View file

@ -61,7 +61,7 @@ This config option is very good if you want to know what config settings are loa
akka { akka {
# Log the complete configuration at INFO level when the actor system is started. # Log the complete configuration at INFO level when the actor system is started.
# This is useful when you are uncertain of what configuration is used. # This is useful when you are uncertain of what configuration is used.
logConfigOnStart = on log-config-on-start = on
} }
If you want very detailed logging of all automatically received messages that are processed If you want very detailed logging of all automatically received messages that are processed
@ -224,7 +224,7 @@ With Logback the thread name is available with ``%X{sourceThread}`` specifier wi
</appender> </appender>
.. note:: .. note::
It will probably be a good idea to use the ``sourceThread`` MDC value also in It will probably be a good idea to use the ``sourceThread`` MDC value also in
non-Akka parts of the application in order to have this property consistently non-Akka parts of the application in order to have this property consistently
available in the logs. available in the logs.

View file

@ -23,7 +23,7 @@ object DurableMailboxDocSpec {
val config = """ val config = """
//#dispatcher-config //#dispatcher-config
my-dispatcher { my-dispatcher {
mailboxType = akka.actor.mailbox.FileBasedMailboxType mailbox-type = akka.actor.mailbox.FileBasedMailboxType
} }
//#dispatcher-config //#dispatcher-config
""" """

View file

@ -99,7 +99,7 @@ You configure durable mailboxes through the dispatcher, as described in
Config:: Config::
my-dispatcher { my-dispatcher {
mailboxType = akka.actor.mailbox.FileBasedMailboxType mailbox-type = akka.actor.mailbox.FileBasedMailboxType
} }
You can also configure and tune the file-based durable mailbox. This is done in You can also configure and tune the file-based durable mailbox. This is done in
@ -124,7 +124,7 @@ You configure durable mailboxes through the dispatcher, as described in
Config:: Config::
my-dispatcher { my-dispatcher {
mailboxType = akka.actor.mailbox.RedisBasedMailboxType mailbox-type = akka.actor.mailbox.RedisBasedMailboxType
} }
You also need to configure the IP and port for the Redis server. This is done in You also need to configure the IP and port for the Redis server. This is done in
@ -150,7 +150,7 @@ You configure durable mailboxes through the dispatcher, as described in
Config:: Config::
my-dispatcher { my-dispatcher {
mailboxType = akka.actor.mailbox.ZooKeeperBasedMailboxType mailbox-type = akka.actor.mailbox.ZooKeeperBasedMailboxType
} }
You also need to configure ZooKeeper server addresses, timeouts, etc. This is You also need to configure ZooKeeper server addresses, timeouts, etc. This is
@ -173,7 +173,7 @@ You configure durable mailboxes through the dispatcher, as described in
Config:: Config::
my-dispatcher { my-dispatcher {
mailboxType = akka.actor.mailbox.BeanstalkBasedMailboxType mailbox-type = akka.actor.mailbox.BeanstalkBasedMailboxType
} }
You also need to configure the IP, and port, and so on, for the Beanstalk You also need to configure the IP, and port, and so on, for the Beanstalk
@ -202,7 +202,7 @@ You configure durable mailboxes through the dispatcher, as described in
Config:: Config::
my-dispatcher { my-dispatcher {
mailboxType = akka.actor.mailbox.MongoBasedMailboxType mailbox-type = akka.actor.mailbox.MongoBasedMailboxType
} }
You will need to configure the URI for the MongoDB server, using the URI Format specified in the You will need to configure the URI for the MongoDB server, using the URI Format specified in the

View file

@ -326,7 +326,7 @@ v1.3::
v2.0:: v2.0::
-Dconfig.file=<file path to configuration file> -Dconfig.file=<file path to configuration file>
-Dakka.logConfigOnStart=on -Dakka.log-config-on-start=on
Several configuration properties have been changed, such as: Several configuration properties have been changed, such as:

View file

@ -94,13 +94,13 @@ object DispatcherDocSpec {
//#prio-dispatcher-config //#prio-dispatcher-config
prio-dispatcher { prio-dispatcher {
mailboxType = "akka.docs.dispatcher.DispatcherDocSpec$PrioMailbox" mailbox-type = "akka.docs.dispatcher.DispatcherDocSpec$PrioMailbox"
} }
//#prio-dispatcher-config //#prio-dispatcher-config
//#prio-dispatcher-config-java //#prio-dispatcher-config-java
prio-dispatcher-java { prio-dispatcher-java {
mailboxType = "akka.docs.dispatcher.DispatcherDocTestBase$PrioMailbox" mailbox-type = "akka.docs.dispatcher.DispatcherDocTestBase$PrioMailbox"
} }
//#prio-dispatcher-config-java //#prio-dispatcher-config-java
""" """

View file

@ -58,7 +58,7 @@ This config option is very good if you want to know what config settings are loa
akka { akka {
# Log the complete configuration at INFO level when the actor system is started. # Log the complete configuration at INFO level when the actor system is started.
# This is useful when you are uncertain of what configuration is used. # This is useful when you are uncertain of what configuration is used.
logConfigOnStart = on log-config-on-start = on
} }
If you want very detailed logging of all user-level messages that are processed If you want very detailed logging of all user-level messages that are processed
@ -257,7 +257,7 @@ With Logback the thread name is available with ``%X{sourceThread}`` specifier wi
</appender> </appender>
.. note:: .. note::
It will probably be a good idea to use the ``sourceThread`` MDC value also in It will probably be a good idea to use the ``sourceThread`` MDC value also in
non-Akka parts of the application in order to have this property consistently non-Akka parts of the application in order to have this property consistently
available in the logs. available in the logs.

View file

@ -3,7 +3,7 @@ package akka.actor.mailbox
object BeanstalkBasedMailboxSpec { object BeanstalkBasedMailboxSpec {
val config = """ val config = """
Beanstalkd-dispatcher { Beanstalkd-dispatcher {
mailboxType = akka.actor.mailbox.BeanstalkBasedMailboxType mailbox-type = akka.actor.mailbox.BeanstalkBasedMailboxType
throughput = 1 throughput = 1
} }
""" """

View file

@ -5,7 +5,7 @@ import org.apache.commons.io.FileUtils
object FileBasedMailboxSpec { object FileBasedMailboxSpec {
val config = """ val config = """
File-dispatcher { File-dispatcher {
mailboxType = akka.actor.mailbox.FileBasedMailboxType mailbox-type = akka.actor.mailbox.FileBasedMailboxType
throughput = 1 throughput = 1
} }
""" """

View file

@ -12,7 +12,7 @@ import akka.dispatch.MessageDispatcher
object MongoBasedMailboxSpec { object MongoBasedMailboxSpec {
val config = """ val config = """
mongodb-dispatcher { mongodb-dispatcher {
mailboxType = akka.actor.mailbox.MongoBasedMailboxType mailbox-type = akka.actor.mailbox.MongoBasedMailboxType
throughput = 1 throughput = 1
} }
""" """

View file

@ -3,7 +3,7 @@ package akka.actor.mailbox
object RedisBasedMailboxSpec { object RedisBasedMailboxSpec {
val config = """ val config = """
Redis-dispatcher { Redis-dispatcher {
mailboxType = akka.actor.mailbox.RedisBasedMailboxType mailbox-type = akka.actor.mailbox.RedisBasedMailboxType
throughput = 1 throughput = 1
} }
""" """

View file

@ -9,7 +9,7 @@ import akka.actor.ActorRef
object ZooKeeperBasedMailboxSpec { object ZooKeeperBasedMailboxSpec {
val config = """ val config = """
ZooKeeper-dispatcher { ZooKeeper-dispatcher {
mailboxType = akka.actor.mailbox.ZooKeeperBasedMailboxType mailbox-type = akka.actor.mailbox.ZooKeeperBasedMailboxType
throughput = 1 throughput = 1
} }
""" """