diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/consume.java b/akka-camel/src/main/java/se/scalablesolutions/akka/annotation/consume.java similarity index 100% rename from akka-core/src/main/java/se/scalablesolutions/akka/annotation/consume.java rename to akka-camel/src/main/java/se/scalablesolutions/akka/annotation/consume.java diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/configuration.java b/akka-core/src/main/java/se/scalablesolutions/akka/annotation/configuration.java deleted file mode 100644 index 9c5375398b..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/configuration.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (C) 2009-2010 Scalable Solutions AB - */ - -package se.scalablesolutions.akka.actor.annotation; - -import java.lang.annotation.*; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface configuration {} diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/inittransactionalstate.java b/akka-core/src/main/java/se/scalablesolutions/akka/annotation/inittransactionalstate.java deleted file mode 100644 index 35c5f05afe..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/inittransactionalstate.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (C) 2009-2010 Scalable Solutions AB - */ - -package se.scalablesolutions.akka.actor.annotation; - -import java.lang.annotation.*; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -public @interface inittransactionalstate {} diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/postrestart.java b/akka-core/src/main/java/se/scalablesolutions/akka/annotation/postrestart.java deleted file mode 100644 index 5eed474832..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/postrestart.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (C) 2009-2010 Scalable Solutions AB - */ - -package se.scalablesolutions.akka.actor.annotation; - -import java.lang.annotation.*; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -public @interface postrestart {} diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/prerestart.java b/akka-core/src/main/java/se/scalablesolutions/akka/annotation/prerestart.java deleted file mode 100644 index 94f9a01405..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/prerestart.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (C) 2009-2010 Scalable Solutions AB - */ - -package se.scalablesolutions.akka.actor.annotation; - -import java.lang.annotation.*; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -public @interface prerestart {} diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/shutdown.java b/akka-core/src/main/java/se/scalablesolutions/akka/annotation/shutdown.java deleted file mode 100644 index f806e7bca6..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/shutdown.java +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (C) 2009-2010 Scalable Solutions AB - */ - -package se.scalablesolutions.akka.actor.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) -public @interface shutdown {} \ No newline at end of file diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/state.java b/akka-core/src/main/java/se/scalablesolutions/akka/annotation/state.java deleted file mode 100644 index 509d129c1b..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/state.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (C) 2009-2010 Scalable Solutions AB - */ - -package se.scalablesolutions.akka.actor.annotation; - -import java.lang.annotation.*; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface state {} diff --git a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/transactionrequired.java b/akka-core/src/main/java/se/scalablesolutions/akka/annotation/transactionrequired.java deleted file mode 100644 index c41a09ee46..0000000000 --- a/akka-core/src/main/java/se/scalablesolutions/akka/annotation/transactionrequired.java +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (C) 2009-2010 Scalable Solutions AB - */ - -package se.scalablesolutions.akka.actor.annotation; - -import java.lang.annotation.*; - -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface transactionrequired {} diff --git a/akka-core/src/main/protocol/RemoteProtocol.proto b/akka-core/src/main/protocol/RemoteProtocol.proto index 0417251d55..6cf9bfd534 100644 --- a/akka-core/src/main/protocol/RemoteProtocol.proto +++ b/akka-core/src/main/protocol/RemoteProtocol.proto @@ -138,10 +138,6 @@ enum DispatcherType { */ message LifeCycleProtocol { required LifeCycleType lifeCycle = 1; - optional string preRestart = 2; - optional string postRestart = 3; - optional string init = 4; - optional string shutdown = 5; } /** diff --git a/akka-core/src/main/scala/actor/ActorRef.scala b/akka-core/src/main/scala/actor/ActorRef.scala index 78585b0e1b..2fd205edeb 100644 --- a/akka-core/src/main/scala/actor/ActorRef.scala +++ b/akka-core/src/main/scala/actor/ActorRef.scala @@ -999,7 +999,7 @@ class LocalActorRef private[akka]( val failedActor = actorInstance.get guard.withGuard { lifeCycle match { - case Some(LifeCycle(Temporary, _, _)) => shutDownTemporaryActor(this) + case Some(LifeCycle(Temporary)) => shutDownTemporaryActor(this) case _ => // either permanent or none where default is permanent Actor.log.info("Restarting actor [%s] configured as PERMANENT.", id) @@ -1018,7 +1018,7 @@ class LocalActorRef private[akka]( linkedActorsAsList.foreach { actorRef => actorRef.lifeCycle match { // either permanent or none where default is permanent - case Some(LifeCycle(Temporary, _, _)) => shutDownTemporaryActor(actorRef) + case Some(LifeCycle(Temporary)) => shutDownTemporaryActor(actorRef) case _ => actorRef.restart(reason, maxNrOfRetries, withinTimeRange) } } diff --git a/akka-core/src/main/scala/actor/SerializationProtocol.scala b/akka-core/src/main/scala/actor/SerializationProtocol.scala index b1cbb53bdc..20e9842cba 100644 --- a/akka-core/src/main/scala/actor/SerializationProtocol.scala +++ b/akka-core/src/main/scala/actor/SerializationProtocol.scala @@ -85,14 +85,9 @@ object ActorSerialization { } val builder = LifeCycleProtocol.newBuilder actorRef.lifeCycle match { - case Some(LifeCycle(scope, None, _)) => + case Some(LifeCycle(scope)) => setScope(builder, scope) Some(builder.build) - case Some(LifeCycle(scope, Some(callbacks), _)) => - setScope(builder, scope) - builder.setPreRestart(callbacks.preRestart) - builder.setPostRestart(callbacks.postRestart) - Some(builder.build) case None => None } } @@ -134,12 +129,8 @@ object ActorSerialization { val lifeCycle = if (protocol.hasLifeCycle) { val lifeCycleProtocol = protocol.getLifeCycle - val restartCallbacks = - if (lifeCycleProtocol.hasPreRestart || lifeCycleProtocol.hasPostRestart) - Some(RestartCallbacks(lifeCycleProtocol.getPreRestart, lifeCycleProtocol.getPostRestart)) - else None - Some(if (lifeCycleProtocol.getLifeCycle == LifeCycleType.PERMANENT) LifeCycle(Permanent, restartCallbacks) - else if (lifeCycleProtocol.getLifeCycle == LifeCycleType.TEMPORARY) LifeCycle(Temporary, restartCallbacks) + Some(if (lifeCycleProtocol.getLifeCycle == LifeCycleType.PERMANENT) LifeCycle(Permanent) + else if (lifeCycleProtocol.getLifeCycle == LifeCycleType.TEMPORARY) LifeCycle(Temporary) else throw new IllegalActorStateException("LifeCycle type is not valid: " + lifeCycleProtocol.getLifeCycle)) } else None diff --git a/akka-core/src/main/scala/actor/TypedActor.scala b/akka-core/src/main/scala/actor/TypedActor.scala index 460012a84f..ae72da4d70 100644 --- a/akka-core/src/main/scala/actor/TypedActor.scala +++ b/akka-core/src/main/scala/actor/TypedActor.scala @@ -12,7 +12,6 @@ import se.scalablesolutions.akka.dispatch.{MessageDispatcher, Future, Completabl import se.scalablesolutions.akka.config.ScalaConfig._ import se.scalablesolutions.akka.serialization.Serializer import se.scalablesolutions.akka.util._ -import se.scalablesolutions.akka.actor.annotation._ import org.codehaus.aspectwerkz.joinpoint.{MethodRtti, JoinPoint} import org.codehaus.aspectwerkz.proxy.Proxy @@ -189,7 +188,6 @@ abstract class TypedActor extends Logging { * * @author Jonas Bonér */ -@transactionrequired abstract class TypedTransactor extends TypedActor /** @@ -201,8 +199,6 @@ abstract class TypedTransactor extends TypedActor */ final class TypedActorConfiguration { private[akka] var _timeout: Long = Actor.TIMEOUT - private[akka] var _restartCallbacks: Option[RestartCallbacks] = None - private[akka] var _shutdownCallback: Option[ShutdownCallback] = None private[akka] var _transactionRequired = false private[akka] var _host: Option[InetSocketAddress] = None private[akka] var _messageDispatcher: Option[MessageDispatcher] = None @@ -213,16 +209,6 @@ final class TypedActorConfiguration { this } - def restartCallbacks(pre: String, post: String) : TypedActorConfiguration = { - _restartCallbacks = Some(new RestartCallbacks(pre, post)) - this - } - - def shutdownCallback(down: String) : TypedActorConfiguration = { - _shutdownCallback = Some(new ShutdownCallback(down)) - this - } - def makeTransactionRequired() : TypedActorConfiguration = { _transactionRequired = true; this @@ -501,17 +487,6 @@ private[akka] object TypedActorContext { private[actor] val senderFuture = new DynamicVariable[CompletableFuture[Any]](null) } -/** - * @author Jonas Bonér - */ -object Annotations { - val transactionrequired = classOf[transactionrequired] - val prerestart = classOf[prerestart] - val postrestart = classOf[postrestart] - val shutdown = classOf[shutdown] - val inittransactionalstate = classOf[inittransactionalstate] -} - /** * @author Jonas Bonér */ @@ -716,7 +691,6 @@ private[akka] sealed class TypedActorAspect { object Dispatcher { val ZERO_ITEM_CLASS_ARRAY = Array[Class[_]]() val ZERO_ITEM_OBJECT_ARRAY = Array[Object]() -// var crashedActorTl: ThreadLocal[Dispatcher] = new ThreadLocal(); } /** @@ -773,7 +747,6 @@ private[akka] class Dispatcher(transactionalRequired: Boolean) extends Actor { } override def preRestart(reason: Throwable) { -// crashedActorTl.set(this) targetInstance.preRestart(reason) // rewrite target instance in Dispatcher and AspectWerkz Proxy @@ -785,16 +758,6 @@ private[akka] class Dispatcher(transactionalRequired: Boolean) extends Actor { targetInstance.postRestart(reason) } - override def init { - // Get the crashed dispatcher from thread local and intitialize this actor with the - // contents of the old dispatcher -// val oldActor = crashedActorTl.get -// if (oldActor != null) { -// initialize(oldActor.targetClass, oldActor.targetInstance, oldActor.proxy, oldActor.context) -// crashedActorTl.set(null) -// } - } - override def shutdown { targetInstance.shutdown AspectInitRegistry.unregister(proxy); @@ -806,7 +769,7 @@ private[akka] class Dispatcher(transactionalRequired: Boolean) extends Actor { def isTransactional(clazz: Class[_]): Boolean = if (clazz == null) false - else if (clazz.isAnnotationPresent(Annotations.transactionrequired)) true + else if (clazz.isAssignableFrom(classOf[TypedTransactor])) true else isTransactional(clazz.getSuperclass) private def serializeArguments(joinPoint: JoinPoint) = { diff --git a/akka-core/src/main/scala/config/SupervisionConfig.scala b/akka-core/src/main/scala/config/SupervisionConfig.scala index 1f5fd15a9b..cb0829704d 100644 --- a/akka-core/src/main/scala/config/SupervisionConfig.scala +++ b/akka-core/src/main/scala/config/SupervisionConfig.scala @@ -42,16 +42,7 @@ object ScalaConfig { case object AllForOne extends FailOverScheme case object OneForOne extends FailOverScheme - case class LifeCycle(scope: Scope, - restartCallbacks: Option[RestartCallbacks] = None, - shutdownCallback: Option[ShutdownCallback] = None) extends ConfigElement - case class RestartCallbacks(preRestart: String, postRestart: String) { - if ((preRestart eq null) || (postRestart eq null)) throw new IllegalArgumentException("Restart callback methods can't be null") - } - case class ShutdownCallback(shutdown: String) { - if (shutdown eq null) throw new IllegalArgumentException("Shutdown callback method can't be null") - } - + case class LifeCycle(scope: Scope) extends ConfigElement case object Permanent extends Scope case object Temporary extends Scope @@ -137,26 +128,12 @@ object JavaConfig { scheme.transform, maxNrOfRetries, withinTimeRange, trapExceptions.toList) } - class LifeCycle(@BeanProperty val scope: Scope, - @BeanProperty val restartCallbacks: RestartCallbacks, - @BeanProperty val shutdownCallback: ShutdownCallback) extends ConfigElement { - def this(scope: Scope) = this(scope, null, null) - def this(scope: Scope, restartCallbacks: RestartCallbacks) = this(scope, restartCallbacks, null) - def this(scope: Scope, shutdownCallback: ShutdownCallback) = this(scope, null, shutdownCallback) + class LifeCycle(@BeanProperty val scope: Scope) extends ConfigElement { def transform = { - val restartCallbacksOption = if (restartCallbacks eq null) None else Some(restartCallbacks.transform) - val shutdownCallbackOption = if (shutdownCallback eq null) None else Some(shutdownCallback.transform) - se.scalablesolutions.akka.config.ScalaConfig.LifeCycle(scope.transform, restartCallbacksOption, shutdownCallbackOption) + se.scalablesolutions.akka.config.ScalaConfig.LifeCycle(scope.transform) } } - class RestartCallbacks(@BeanProperty val preRestart: String, @BeanProperty val postRestart: String) { - def transform = se.scalablesolutions.akka.config.ScalaConfig.RestartCallbacks(preRestart, postRestart) - } - class ShutdownCallback(@BeanProperty val shutdown: String) { - def transform = se.scalablesolutions.akka.config.ScalaConfig.ShutdownCallback(shutdown) - } - abstract class Scope extends ConfigElement { def transform: se.scalablesolutions.akka.config.ScalaConfig.Scope } diff --git a/akka-spring/src/main/resources/se/scalablesolutions/akka/spring/akka-0.10.xsd b/akka-spring/src/main/resources/se/scalablesolutions/akka/spring/akka-0.10.xsd index ed83a5bdc2..6dd0ee7681 100644 --- a/akka-spring/src/main/resources/se/scalablesolutions/akka/spring/akka-0.10.xsd +++ b/akka-spring/src/main/resources/se/scalablesolutions/akka/spring/akka-0.10.xsd @@ -105,46 +105,22 @@ - - - - - - Pre restart callback method that is called during restart. - - - - - - - Post restart callback method that is called during restart. - - - - - - - - - - - Shutdown callback method that is called during shut down. - - - - - - - + + + + Name of the interface implemented by implementation class. + + + @@ -155,35 +131,28 @@ - default timeout for '!!' invocations + Theh default timeout for '!!' invocations. - Set to true if messages should have REQUIRES_NEW semantics - - - - - - - Interface implemented by target class. + Set this to true if messages should have REQUIRES_NEW semantics. - Lifecycle, permanent or temporary + Defines the lifecycle, can be either 'permanent' or 'temporary'. - Supported scopes are singleton and prototype + Supported scopes are 'singleton' and 'prototype'. @@ -211,21 +180,21 @@ - Failover scheme, AllForOne or OneForOne + Failover scheme, can be one of 'AllForOne' or 'OneForOne'. - Maximal number of retries. + Maximal number of restarts. - Timerange for restart. + Time range for maximal number of restart. diff --git a/akka-spring/src/main/scala/AkkaSpringConfigurationTags.scala b/akka-spring/src/main/scala/AkkaSpringConfigurationTags.scala index 0d4ff9aaab..857d20fa55 100644 --- a/akka-spring/src/main/scala/AkkaSpringConfigurationTags.scala +++ b/akka-spring/src/main/scala/AkkaSpringConfigurationTags.scala @@ -20,8 +20,6 @@ object AkkaSpringConfigurationTags { val CAMEL_SERVICE_TAG = "camel-service" // typed-actor sub tags - val RESTART_CALLBACKS_TAG = "restart-callbacks" - val SHUTDOWN_CALLBACK_TAG = "shutdown-callback" val REMOTE_TAG = "remote" // superivision sub tags @@ -45,9 +43,6 @@ object AkkaSpringConfigurationTags { val TRANSACTIONAL = "transactional" val HOST = "host" val PORT = "port" - val PRE_RESTART = "pre" - val POST_RESTART = "post" - val SHUTDOWN = "shutdown" val LIFECYCLE = "lifecycle" val SCOPE = "scope" diff --git a/akka-spring/src/main/scala/TypedActorFactoryBean.scala b/akka-spring/src/main/scala/TypedActorFactoryBean.scala index 8ddcaced6a..0cb70e5ae3 100644 --- a/akka-spring/src/main/scala/TypedActorFactoryBean.scala +++ b/akka-spring/src/main/scala/TypedActorFactoryBean.scala @@ -21,7 +21,6 @@ import org.springframework.util.ReflectionUtils import org.springframework.util.StringUtils import se.scalablesolutions.akka.actor.{AspectInitRegistry, TypedActorConfiguration, TypedActor} -import se.scalablesolutions.akka.config.ScalaConfig.{ShutdownCallback, RestartCallbacks} import se.scalablesolutions.akka.dispatch.MessageDispatcher import se.scalablesolutions.akka.util.{Logging, Duration} @@ -50,9 +49,6 @@ class TypedActorFactoryBean extends AbstractFactoryBean[AnyRef] with Logging wit @BeanProperty var implementation: String = "" @BeanProperty var timeout: Long = _ @BeanProperty var transactional: Boolean = false - @BeanProperty var pre: String = "" - @BeanProperty var post: String = "" - @BeanProperty var shutdown: String = "" @BeanProperty var host: String = "" @BeanProperty var port: Int = _ @BeanProperty var lifecycle: String = "" @@ -137,8 +133,6 @@ class TypedActorFactoryBean extends AbstractFactoryBean[AnyRef] with Logging wit private[akka] def createConfig: TypedActorConfiguration = { val config = new TypedActorConfiguration().timeout(Duration(timeout, "millis")) - if (hasRestartCallbacks) config.restartCallbacks(pre, post) - if (hasShutdownCallback) config.shutdownCallback(shutdown) if (transactional) config.makeTransactionRequired config } @@ -147,12 +141,6 @@ class TypedActorFactoryBean extends AbstractFactoryBean[AnyRef] with Logging wit private[akka] def hasInterface = (interface != null) && (!interface.isEmpty) - private[akka] def hasRestartCallbacks = - ((pre != null) && !pre.isEmpty) || - ((post != null) && !post.isEmpty) - - private[akka] def hasShutdownCallback = ((shutdown != null) && !shutdown.isEmpty) - private[akka] def hasDispatcher = (dispatcher != null) && (dispatcher.dispatcherType != null) && diff --git a/akka-spring/src/main/scala/TypedActorParser.scala b/akka-spring/src/main/scala/TypedActorParser.scala index 1483a35dba..5f4d68f297 100644 --- a/akka-spring/src/main/scala/TypedActorParser.scala +++ b/akka-spring/src/main/scala/TypedActorParser.scala @@ -26,8 +26,6 @@ trait TypedActorParser extends BeanParser with DispatcherParser { def parseTypedActor(element: Element): TypedActorProperties = { val objectProperties = new TypedActorProperties() val remoteElement = DomUtils.getChildElementByTagName(element, REMOTE_TAG); - val restartCallbacksElement = DomUtils.getChildElementByTagName(element, RESTART_CALLBACKS_TAG); - val shutdownCallbackElement = DomUtils.getChildElementByTagName(element, SHUTDOWN_CALLBACK_TAG); val dispatcherElement = DomUtils.getChildElementByTagName(element, DISPATCHER_TAG) val propertyEntries = DomUtils.getChildElementsByTagName(element,PROPERTYENTRY_TAG) @@ -36,29 +34,17 @@ trait TypedActorParser extends BeanParser with DispatcherParser { objectProperties.port = mandatory(remoteElement, PORT).toInt } - if (restartCallbacksElement != null) { - objectProperties.preRestart = restartCallbacksElement.getAttribute(PRE_RESTART) - objectProperties.postRestart = restartCallbacksElement.getAttribute(POST_RESTART) - if ((objectProperties.preRestart.isEmpty) && (objectProperties.preRestart.isEmpty)) { - throw new IllegalActorStateException("At least one of pre or post must be defined.") - } - } - - if (shutdownCallbackElement != null) { - objectProperties.shutdown = shutdownCallbackElement.getAttribute("method") - } - if (dispatcherElement != null) { val dispatcherProperties = parseDispatcher(dispatcherElement) objectProperties.dispatcher = dispatcherProperties } - for(element <- propertyEntries) { - val entry = new PropertyEntry() - entry.name = element.getAttribute("name"); - entry.value = element.getAttribute("value") - entry.ref = element.getAttribute("ref") - objectProperties.propertyEntries.add(entry) + for (element <- propertyEntries) { + val entry = new PropertyEntry + entry.name = element.getAttribute("name"); + entry.value = element.getAttribute("value") + entry.ref = element.getAttribute("ref") + objectProperties.propertyEntries.add(entry) } try { diff --git a/akka-spring/src/main/scala/TypedActorProperties.scala b/akka-spring/src/main/scala/TypedActorProperties.scala index 6390110676..46c9cd35aa 100644 --- a/akka-spring/src/main/scala/TypedActorProperties.scala +++ b/akka-spring/src/main/scala/TypedActorProperties.scala @@ -17,9 +17,6 @@ class TypedActorProperties { var timeout: Long = _ var interface: String = "" var transactional: Boolean = false - var preRestart: String = "" - var postRestart: String = "" - var shutdown: String = "" var host: String = "" var port: Int = _ var lifecycle: String = "" @@ -35,9 +32,6 @@ class TypedActorProperties { def setAsProperties(builder: BeanDefinitionBuilder) { builder.addPropertyValue(HOST, host) builder.addPropertyValue(PORT, port) - builder.addPropertyValue(PRE_RESTART, preRestart) - builder.addPropertyValue(POST_RESTART, postRestart) - builder.addPropertyValue(SHUTDOWN, shutdown) builder.addPropertyValue(TIMEOUT, timeout) builder.addPropertyValue(IMPLEMENTATION, target) builder.addPropertyValue(INTERFACE, interface) diff --git a/akka-spring/src/test/scala/SupervisionBeanDefinitionParserTest.scala b/akka-spring/src/test/scala/SupervisionBeanDefinitionParserTest.scala index cd185c9b4b..a5fc44007f 100644 --- a/akka-spring/src/test/scala/SupervisionBeanDefinitionParserTest.scala +++ b/akka-spring/src/test/scala/SupervisionBeanDefinitionParserTest.scala @@ -59,9 +59,6 @@ class SupervisionBeanDefinitionParserTest extends Spec with ShouldMatchers { expect("foo.bar.Bar") { prop2.target } expect("foo.bar.MyPojo") { prop3.target } expect("foo.bar.MyPojo") { prop4.target } - expect("preRestart") { prop3.preRestart } - expect("postRestart") { prop3.postRestart } - expect("shutdown") { prop4.shutdown } expect("permanent") { prop1.lifecycle } expect("temporary") { prop4.lifecycle } }