Merge pull request #27978 from akka/wip-scala-2.12-simplifications-patriknw
small simplification since Scala 2.11 isn't supported
This commit is contained in:
commit
c83d04c1f8
5 changed files with 5 additions and 15 deletions
|
|
@ -372,9 +372,7 @@ object Receptionist extends ExtensionId[Receptionist] {
|
|||
|
||||
object ReceptionistSetup {
|
||||
def apply[T <: Extension](createExtension: ActorSystem[_] => Receptionist): ReceptionistSetup =
|
||||
new ReceptionistSetup(new java.util.function.Function[ActorSystem[_], Receptionist] {
|
||||
override def apply(sys: ActorSystem[_]): Receptionist = createExtension(sys)
|
||||
}) // TODO can be simplified when compiled only with Scala >= 2.12
|
||||
new ReceptionistSetup(createExtension(_))
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -445,9 +445,7 @@ object EntityTypeKey {
|
|||
|
||||
object ClusterShardingSetup {
|
||||
def apply[T <: Extension](createExtension: ActorSystem[_] => ClusterSharding): ClusterShardingSetup =
|
||||
new ClusterShardingSetup(new java.util.function.Function[ActorSystem[_], ClusterSharding] {
|
||||
override def apply(sys: ActorSystem[_]): ClusterSharding = createExtension(sys)
|
||||
}) // TODO can be simplified when compiled only with Scala >= 2.12
|
||||
new ClusterShardingSetup(createExtension(_))
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,9 +99,7 @@ abstract class DistributedData extends Extension {
|
|||
|
||||
object DistributedDataSetup {
|
||||
def apply[T <: Extension](createExtension: ActorSystem[_] => DistributedData): DistributedDataSetup =
|
||||
new DistributedDataSetup(new java.util.function.Function[ActorSystem[_], DistributedData] {
|
||||
override def apply(sys: ActorSystem[_]): DistributedData = createExtension(sys)
|
||||
}) // TODO can be simplified when compiled only with Scala >= 2.12
|
||||
new DistributedDataSetup(createExtension(_))
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,9 +194,7 @@ abstract class Cluster extends Extension {
|
|||
|
||||
object ClusterSetup {
|
||||
def apply[T <: Extension](createExtension: ActorSystem[_] => Cluster): ClusterSetup =
|
||||
new ClusterSetup(new java.util.function.Function[ActorSystem[_], Cluster] {
|
||||
override def apply(sys: ActorSystem[_]): Cluster = createExtension(sys)
|
||||
}) // TODO can be simplified when compiled only with Scala >= 2.12
|
||||
new ClusterSetup(createExtension(_))
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -297,9 +297,7 @@ final class ClusterSingletonManagerSettings(
|
|||
|
||||
object ClusterSingletonSetup {
|
||||
def apply[T <: Extension](createExtension: ActorSystem[_] => ClusterSingleton): ClusterSingletonSetup =
|
||||
new ClusterSingletonSetup(new java.util.function.Function[ActorSystem[_], ClusterSingleton] {
|
||||
override def apply(sys: ActorSystem[_]): ClusterSingleton = createExtension(sys)
|
||||
}) // TODO can be simplified when compiled only with Scala >= 2.12
|
||||
new ClusterSingletonSetup(createExtension(_))
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue