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