Merge pull request #22595 from akka/wip-spawnAdapter-2.12-patriknw
rename spawnAdapter due to Scala 2.12 compilation error
This commit is contained in:
commit
389dcba314
3 changed files with 14 additions and 14 deletions
|
|
@ -2864,7 +2864,7 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* java.lang.RuntimePermission}{@code ("modifyThread")}
|
||||
*/
|
||||
public ForkJoinPool(int parallelism,
|
||||
ForkJoinWorkerThreadFactory factory,
|
||||
ForkJoinPool.ForkJoinWorkerThreadFactory factory,
|
||||
Thread.UncaughtExceptionHandler handler,
|
||||
boolean asyncMode) {
|
||||
checkPermission();
|
||||
|
|
@ -2889,7 +2889,7 @@ public class ForkJoinPool extends AbstractExecutorService {
|
|||
* Basically the same as above, but uses smallest possible initial footprint.
|
||||
*/
|
||||
ForkJoinPool(int parallelism, long ctl,
|
||||
ForkJoinWorkerThreadFactory factory,
|
||||
ForkJoinPool.ForkJoinWorkerThreadFactory factory,
|
||||
Thread.UncaughtExceptionHandler handler) {
|
||||
this.config = parallelism;
|
||||
this.ctl = ctl;
|
||||
|
|
|
|||
|
|
@ -147,13 +147,13 @@ public interface ActorContext<T> {
|
|||
* with an inserted hyphen between these two parts. Therefore the given <code>name</code>
|
||||
* argument does not need to be unique within the scope of the parent actor.
|
||||
*/
|
||||
public <U> ActorRef<U> spawnAdapter(Function<U, T> f, String name);
|
||||
public <U> ActorRef<U> createAdapter(Function<U, T> f, String name);
|
||||
|
||||
/**
|
||||
* Create an anonymous child actor that will wrap messages such that other
|
||||
* Actor’s protocols can be ingested by this Actor. You are strongly advised
|
||||
* to cache these ActorRefs or to stop them when no longer needed.
|
||||
*/
|
||||
public <U> ActorRef<U> spawnAdapter(Function<U, T> f);
|
||||
public <U> ActorRef<U> createAdapter(Function<U, T> f);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ import akka.annotation.ApiMayChange
|
|||
@DoNotInherit
|
||||
@ApiMayChange
|
||||
trait ActorContext[T] extends javadsl.ActorContext[T] with scaladsl.ActorContext[T] {
|
||||
def getChild(name: String): Optional[ActorRef[Void]] =
|
||||
override def getChild(name: String): Optional[ActorRef[Void]] =
|
||||
child(name) match {
|
||||
case Some(c) ⇒ Optional.of(c.upcast[Void])
|
||||
case None ⇒ Optional.empty()
|
||||
}
|
||||
|
||||
def getChildren(): java.util.List[akka.typed.ActorRef[Void]] = {
|
||||
override def getChildren(): java.util.List[akka.typed.ActorRef[Void]] = {
|
||||
val c = children
|
||||
val a = new ArrayList[ActorRef[Void]](c.size)
|
||||
val i = c.iterator
|
||||
|
|
@ -35,28 +35,28 @@ trait ActorContext[T] extends javadsl.ActorContext[T] with scaladsl.ActorContext
|
|||
a
|
||||
}
|
||||
|
||||
def getExecutionContext(): scala.concurrent.ExecutionContextExecutor =
|
||||
override def getExecutionContext(): scala.concurrent.ExecutionContextExecutor =
|
||||
executionContext
|
||||
|
||||
def getMailboxCapacity(): Int =
|
||||
override def getMailboxCapacity(): Int =
|
||||
mailboxCapacity
|
||||
|
||||
def getSelf(): akka.typed.ActorRef[T] =
|
||||
override def getSelf(): akka.typed.ActorRef[T] =
|
||||
self
|
||||
|
||||
def getSystem(): akka.typed.ActorSystem[Void] =
|
||||
override def getSystem(): akka.typed.ActorSystem[Void] =
|
||||
system.asInstanceOf[ActorSystem[Void]]
|
||||
|
||||
def spawn[U](behavior: akka.typed.Behavior[U], name: String): akka.typed.ActorRef[U] =
|
||||
override def spawn[U](behavior: akka.typed.Behavior[U], name: String): akka.typed.ActorRef[U] =
|
||||
spawn(behavior, name, EmptyDeploymentConfig)
|
||||
|
||||
def spawnAnonymous[U](behavior: akka.typed.Behavior[U]): akka.typed.ActorRef[U] =
|
||||
override def spawnAnonymous[U](behavior: akka.typed.Behavior[U]): akka.typed.ActorRef[U] =
|
||||
spawnAnonymous(behavior, EmptyDeploymentConfig)
|
||||
|
||||
def spawnAdapter[U](f: java.util.function.Function[U, T]): akka.typed.ActorRef[U] =
|
||||
override def createAdapter[U](f: java.util.function.Function[U, T]): akka.typed.ActorRef[U] =
|
||||
spawnAdapter(f.apply _)
|
||||
|
||||
def spawnAdapter[U](f: java.util.function.Function[U, T], name: String): akka.typed.ActorRef[U] =
|
||||
override def createAdapter[U](f: java.util.function.Function[U, T], name: String): akka.typed.ActorRef[U] =
|
||||
spawnAdapter(f.apply _, name)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue