re #290: Added parens to no-parameter methods returning Unit in rest of akka-core.

This commit is contained in:
Heiko Seeberger 2010-07-02 21:57:44 +02:00
parent 73e6a2e5d0
commit 2959ea3e07
9 changed files with 16 additions and 16 deletions

View file

@ -134,7 +134,7 @@ sealed class Supervisor private[akka] (
this this
} }
def shutdown: Unit = supervisor.stop def shutdown(): Unit = supervisor.stop
def link(child: ActorRef) = supervisor.link(child) def link(child: ActorRef) = supervisor.link(child)
@ -183,7 +183,7 @@ final class SupervisorActor private[akka] (
trapExit = trapExceptions trapExit = trapExceptions
faultHandler = Some(handler) faultHandler = Some(handler)
override def shutdown: Unit = shutdownLinkedActors override def shutdown(): Unit = shutdownLinkedActors
def receive = { def receive = {
case unknown => throw new SupervisorException( case unknown => throw new SupervisorException(

View file

@ -133,7 +133,7 @@ class ExecutorBasedEventDrivenDispatcher(_name: String, throughput: Int = Dispat
def usesActorMailbox = true def usesActorMailbox = true
def ensureNotActive: Unit = if (active) throw new IllegalActorStateException( def ensureNotActive(): Unit = if (active) throw new IllegalActorStateException(
"Can't build a new thread pool for a dispatcher that is already up and running") "Can't build a new thread pool for a dispatcher that is already up and running")
private[akka] def init = withNewThreadPoolWithLinkedBlockingQueueWithUnboundedCapacity.buildThreadPool private[akka] def init = withNewThreadPoolWithLinkedBlockingQueueWithUnboundedCapacity.buildThreadPool

View file

@ -162,7 +162,7 @@ class ExecutorBasedEventDrivenWorkStealingDispatcher(_name: String) extends Mess
references.clear references.clear
} }
def ensureNotActive: Unit = if (active) throw new IllegalActorStateException( def ensureNotActive(): Unit = if (active) throw new IllegalActorStateException(
"Can't build a new thread pool for a dispatcher that is already up and running") "Can't build a new thread pool for a dispatcher that is already up and running")
private[akka] def init = withNewThreadPoolWithLinkedBlockingQueueWithUnboundedCapacity.buildThreadPool private[akka] def init = withNewThreadPoolWithLinkedBlockingQueueWithUnboundedCapacity.buildThreadPool

View file

@ -139,7 +139,7 @@ class ReactorBasedThreadPoolEventDrivenDispatcher(_name: String)
def usesActorMailbox = false def usesActorMailbox = false
def ensureNotActive: Unit = if (active) throw new IllegalActorStateException( def ensureNotActive(): Unit = if (active) throw new IllegalActorStateException(
"Can't build a new thread pool for a dispatcher that is already up and running") "Can't build a new thread pool for a dispatcher that is already up and running")
class Demultiplexer(private val messageQueue: ReactiveMessageQueue) extends MessageDemultiplexer { class Demultiplexer(private val messageQueue: ReactiveMessageQueue) extends MessageDemultiplexer {

View file

@ -31,7 +31,7 @@ trait ThreadPoolBuilder {
def isShutdown = executor.isShutdown def isShutdown = executor.isShutdown
def buildThreadPool: Unit = synchronized { def buildThreadPool(): Unit = synchronized {
ensureNotActive ensureNotActive
inProcessOfBuilding = false inProcessOfBuilding = false
if (boundedExecutorBound > 0) { if (boundedExecutorBound > 0) {
@ -152,7 +152,7 @@ trait ThreadPoolBuilder {
"Is not in the process of building a thread pool, start building one by invoking one of the 'newThreadPool*' methods") "Is not in the process of building a thread pool, start building one by invoking one of the 'newThreadPool*' methods")
} }
def ensureNotActive: Unit def ensureNotActive(): Unit
/** /**
* @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a> * @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a>

View file

@ -251,7 +251,7 @@ object Cluster extends Cluster with Logging {
def foreach(f: (RemoteAddress) => Unit): Unit = clusterActor.foreach(_.foreach(f)) def foreach(f: (RemoteAddress) => Unit): Unit = clusterActor.foreach(_.foreach(f))
def start: Unit = start(None) def start(): Unit = start(None)
def start(serializerClassLoader: Option[ClassLoader]): Unit = synchronized { def start(serializerClassLoader: Option[ClassLoader]): Unit = synchronized {
log.info("Starting up Cluster Service...") log.info("Starting up Cluster Service...")
@ -274,7 +274,7 @@ object Cluster extends Cluster with Logging {
} }
} }
def shutdown: Unit = synchronized { def shutdown(): Unit = synchronized {
log.info("Shutting down Cluster Service...") log.info("Shutting down Cluster Service...")
for { for {
c <- clusterActorRef c <- clusterActorRef

View file

@ -38,10 +38,10 @@ class JGroupsClusterActor extends BasicClusterActor {
def suspect(a: Address): Unit = def suspect(a: Address): Unit =
if (isActive) self ! Zombie(a) if (isActive) self ! Zombie(a)
def block: Unit = def block(): Unit =
log debug "UNSUPPORTED: JGroupsClusterActor::block" //TODO HotSwap to a buffering body log debug "UNSUPPORTED: JGroupsClusterActor::block" //TODO HotSwap to a buffering body
def unblock: Unit = def unblock(): Unit =
log debug "UNSUPPORTED: JGroupsClusterActor::unblock" //TODO HotSwap back and flush the buffer log debug "UNSUPPORTED: JGroupsClusterActor::unblock" //TODO HotSwap back and flush the buffer
}) })
}) })

View file

@ -191,13 +191,13 @@ trait Transactional {
* @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a> * @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a>
*/ */
trait Committable { trait Committable {
def commit: Unit def commit(): Unit
} }
/** /**
* @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a> * @author <a href="http://jonasboner.com">Jonas Bon&#233;r</a>
*/ */
trait Abortable { trait Abortable {
def abort: Unit def abort(): Unit
} }

View file

@ -84,7 +84,7 @@ class ExecutorBasedEventDrivenWorkStealingDispatcherSpec extends JUnitSuite with
fast.stop fast.stop
} }
@Test def canNotUseActorsOfDifferentTypesInSameDispatcher: Unit = { @Test def canNotUseActorsOfDifferentTypesInSameDispatcher(): Unit = {
val first = actorOf[FirstActor] val first = actorOf[FirstActor]
val second = actorOf[SecondActor] val second = actorOf[SecondActor]
@ -94,7 +94,7 @@ class ExecutorBasedEventDrivenWorkStealingDispatcherSpec extends JUnitSuite with
} }
} }
@Test def canNotUseActorsOfDifferentSubTypesInSameDispatcher: Unit = { @Test def canNotUseActorsOfDifferentSubTypesInSameDispatcher(): Unit = {
val parent = actorOf[ParentActor] val parent = actorOf[ParentActor]
val child = actorOf[ChildActor] val child = actorOf[ChildActor]