Move 'java 8 compatibility' under 'utilities' (#23232)
Doesn't really deserve a top-level section IMO
This commit is contained in:
parent
5ad217b338
commit
403702d19f
9 changed files with 19 additions and 52 deletions
|
|
@ -7,7 +7,7 @@ used to retrieve the result of some concurrent operation. This result can be acc
|
||||||
or asynchronously (non-blocking). To be able to use this from Java, Akka provides a java friendly interface
|
or asynchronously (non-blocking). To be able to use this from Java, Akka provides a java friendly interface
|
||||||
in `akka.dispatch.Futures`.
|
in `akka.dispatch.Futures`.
|
||||||
|
|
||||||
See also @ref:[Java 8 and Scala Compatibility](scala-compat.md) for Java compatibility.
|
See also @ref:[Java 8 Compatibility](java8-compat.md) for Java compatibility.
|
||||||
|
|
||||||
## Execution Contexts
|
## Execution Contexts
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
# Utilities
|
|
||||||
|
|
||||||
@@toc { depth=2 }
|
|
||||||
|
|
||||||
@@@ index
|
|
||||||
|
|
||||||
* [event-bus](event-bus.md)
|
|
||||||
* [logging](logging.md)
|
|
||||||
* [scheduler](scheduler.md)
|
|
||||||
* [common/duration](common/duration.md)
|
|
||||||
* [common/circuitbreaker](common/circuitbreaker.md)
|
|
||||||
* [extending-akka](extending-akka.md)
|
|
||||||
|
|
||||||
@@@
|
|
||||||
1
akka-docs/src/main/paradox/java/index-utilities.md
Symbolic link
1
akka-docs/src/main/paradox/java/index-utilities.md
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../scala/index-utilities.md
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
# Akka Documentation
|
|
||||||
|
|
||||||
@@toc { depth=2 }
|
|
||||||
|
|
||||||
@@@ index
|
|
||||||
|
|
||||||
* [security/index](security/index.md)
|
|
||||||
* [guide/index](guide/index.md)
|
|
||||||
* [general/index](general/index.md)
|
|
||||||
* [index-actors](index-actors.md)
|
|
||||||
* [index-network](index-network.md)
|
|
||||||
* [stream/index](stream/index.md)
|
|
||||||
* [index-futures](index-futures.md)
|
|
||||||
* [index-utilities](index-utilities.md)
|
|
||||||
* [common/other-modules](common/other-modules.md)
|
|
||||||
* [howto](howto.md)
|
|
||||||
* [scala-compat](scala-compat.md)
|
|
||||||
* [project/index](project/index.md)
|
|
||||||
* [additional/index](additional/index.md)
|
|
||||||
|
|
||||||
@@@
|
|
||||||
1
akka-docs/src/main/paradox/java/index.md
Symbolic link
1
akka-docs/src/main/paradox/java/index.md
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../scala/index.md
|
||||||
1
akka-docs/src/main/paradox/java/java8-compat.md
Symbolic link
1
akka-docs/src/main/paradox/java/java8-compat.md
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../scala/java8-compat.md
|
||||||
|
|
@ -597,7 +597,7 @@ Java
|
||||||
You can also acquire an `ActorRef` for an `ActorSelection` with
|
You can also acquire an `ActorRef` for an `ActorSelection` with
|
||||||
the `resolveOne` method of the `ActorSelection`. It returns a `Future`
|
the `resolveOne` method of the `ActorSelection`. It returns a `Future`
|
||||||
of the matching `ActorRef` if such an actor exists. @java[(see also
|
of the matching `ActorRef` if such an actor exists. @java[(see also
|
||||||
@ref:[Java 8 and Scala Compatibility](scala-compat.md) for Java compatibility).] It is completed with
|
@ref:[Java 8 Compatibility](java8-compat.md) for Java compatibility).] It is completed with
|
||||||
failure [[akka.actor.ActorNotFound]] if no such actor exists or the identification
|
failure [[akka.actor.ActorNotFound]] if no such actor exists or the identification
|
||||||
didn't complete within the supplied `timeout`.
|
didn't complete within the supplied `timeout`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ sense to add to the `akka.pattern` package for creating an [OTP-like library](ht
|
||||||
|
|
||||||
@@@ div { .group-java }
|
@@@ div { .group-java }
|
||||||
|
|
||||||
You might find some of the patterns described in the Scala chapter of
|
You might find some of the patterns described in the Scala chapter of
|
||||||
this page useful even though the example code is written in Scala.
|
this page useful even though the example code is written in Scala.
|
||||||
|
|
||||||
@@@
|
@@@
|
||||||
|
|
||||||
@@@ div { .group-scala }
|
@@@ div { .group-scala }
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ The pattern is described in [Throttling Messages in Akka 2](http://letitcrash.co
|
||||||
Contributed by: Derek Wyatt
|
Contributed by: Derek Wyatt
|
||||||
|
|
||||||
"Often times, people want the functionality of the BalancingDispatcher with the
|
"Often times, people want the functionality of the BalancingDispatcher with the
|
||||||
stipulation that the Actors doing the work have distinct Mailboxes on remote
|
stipulation that the Actors doing the work have distinct Mailboxes on remote
|
||||||
nodes. In this post we’ll explore the implementation of such a concept."
|
nodes. In this post we’ll explore the implementation of such a concept."
|
||||||
|
|
||||||
The pattern is described [Balancing Workload across Nodes with Akka 2](http://letitcrash.com/post/29044669086/balancing-workload-across-nodes-with-akka-2).
|
The pattern is described [Balancing Workload across Nodes with Akka 2](http://letitcrash.com/post/29044669086/balancing-workload-across-nodes-with-akka-2).
|
||||||
|
|
@ -39,10 +39,10 @@ The pattern is described [Balancing Workload across Nodes with Akka 2](http://le
|
||||||
|
|
||||||
Contributed by: Michael Pollmeier
|
Contributed by: Michael Pollmeier
|
||||||
|
|
||||||
"This pattern ensures that your mailboxes don’t overflow if creating work is fast than
|
"This pattern ensures that your mailboxes don’t overflow if creating work is fast than
|
||||||
actually doing it – which can lead to out of memory errors when the mailboxes
|
actually doing it – which can lead to out of memory errors when the mailboxes
|
||||||
eventually become too full. It also let’s you distribute work around your cluster,
|
eventually become too full. It also let’s you distribute work around your cluster,
|
||||||
scale dynamically scale and is completely non-blocking. This pattern is a
|
scale dynamically scale and is completely non-blocking. This pattern is a
|
||||||
specialisation of the above 'Balancing Workload Pattern'."
|
specialisation of the above 'Balancing Workload Pattern'."
|
||||||
|
|
||||||
The pattern is described [Work Pulling Pattern to prevent mailbox overflow, throttle and distribute work](http://www.michaelpollmeier.com/akka-work-pulling-pattern).
|
The pattern is described [Work Pulling Pattern to prevent mailbox overflow, throttle and distribute work](http://www.michaelpollmeier.com/akka-work-pulling-pattern).
|
||||||
|
|
@ -54,8 +54,8 @@ Contributed by: Derek Wyatt
|
||||||
"When an Actor stops, its children stop in an undefined order. Child termination is
|
"When an Actor stops, its children stop in an undefined order. Child termination is
|
||||||
asynchronous and thus non-deterministic.
|
asynchronous and thus non-deterministic.
|
||||||
|
|
||||||
If an Actor has children that have order dependencies, then you might need to ensure
|
If an Actor has children that have order dependencies, then you might need to ensure
|
||||||
a particular shutdown order of those children so that their postStop() methods get
|
a particular shutdown order of those children so that their postStop() methods get
|
||||||
called in the right order."
|
called in the right order."
|
||||||
|
|
||||||
The pattern is described [An Akka 2 Terminator](http://letitcrash.com/post/29773618510/an-akka-2-terminator).
|
The pattern is described [An Akka 2 Terminator](http://letitcrash.com/post/29773618510/an-akka-2-terminator).
|
||||||
|
|
@ -118,7 +118,7 @@ This is where the Spider pattern comes in."
|
||||||
|
|
||||||
The pattern is described [Discovering Message Flows in Actor System with the Spider Pattern](http://letitcrash.com/post/30585282971/discovering-message-flows-in-actor-systems-with-the).
|
The pattern is described [Discovering Message Flows in Actor System with the Spider Pattern](http://letitcrash.com/post/30585282971/discovering-message-flows-in-actor-systems-with-the).
|
||||||
|
|
||||||
@@@
|
@@@
|
||||||
|
|
||||||
## Scheduling Periodic Messages
|
## Scheduling Periodic Messages
|
||||||
|
|
||||||
|
|
@ -182,7 +182,7 @@ Such an actor is unlikely to be reused in a different actor hierarchy and contai
|
||||||
|
|
||||||
This pattern provides a way to encapsulate supervision and error propagation to the temporary actor.
|
This pattern provides a way to encapsulate supervision and error propagation to the temporary actor.
|
||||||
Finally the promise returned by Patterns.ask() is fulfilled as a failure, including the exception
|
Finally the promise returned by Patterns.ask() is fulfilled as a failure, including the exception
|
||||||
(see also @ref:[Java 8 and Scala Compatibility](scala-compat.md) for Java compatibility).
|
(see also @ref:[Java 8 Compatibility](java8-compat.md) for Java compatibility).
|
||||||
|
|
||||||
Let's have a look at the example code:
|
Let's have a look at the example code:
|
||||||
|
|
||||||
|
|
@ -201,4 +201,4 @@ Finally we are able to execute an actor and receive the results or exceptions.
|
||||||
|
|
||||||
@@snip [SupervisedAskSpec.java]($code$/java/jdocs/pattern/SupervisedAskSpec.java)
|
@@snip [SupervisedAskSpec.java]($code$/java/jdocs/pattern/SupervisedAskSpec.java)
|
||||||
|
|
||||||
@@@
|
@@@
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
* [scheduler](scheduler.md)
|
* [scheduler](scheduler.md)
|
||||||
* [common/duration](common/duration.md)
|
* [common/duration](common/duration.md)
|
||||||
* [common/circuitbreaker](common/circuitbreaker.md)
|
* [common/circuitbreaker](common/circuitbreaker.md)
|
||||||
|
* [java8-compat](java8-compat.md)
|
||||||
* [extending-akka](extending-akka.md)
|
* [extending-akka](extending-akka.md)
|
||||||
|
|
||||||
@@@
|
@@@
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
# Java 8 and Scala Compatibility
|
# Java 8 Compatibility
|
||||||
|
|
||||||
Akka requires that you have [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or
|
Akka requires that you have [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or
|
||||||
later installed on your machine.
|
later installed on your machine.
|
||||||
|
|
||||||
## Java 8 types
|
|
||||||
|
|
||||||
Starting with Akka 2.4.2 we have begun to introduce Java 8 types (most
|
Starting with Akka 2.4.2 we have begun to introduce Java 8 types (most
|
||||||
prominently `java.util.concurrent.CompletionStage` and
|
prominently `java.util.concurrent.CompletionStage` and
|
||||||
`java.util.Optional`) where that was possible without breaking binary or
|
`java.util.Optional`) where that was possible without breaking binary or
|
||||||
|
|
@ -25,4 +23,4 @@ We will only be able to seamlessly integrate all functional interfaces once
|
||||||
we can rely on Scala 2.12 to provide full interoperability—this will mean that
|
we can rely on Scala 2.12 to provide full interoperability—this will mean that
|
||||||
Scala users can directly implement Java Functional Interfaces using lambda syntax
|
Scala users can directly implement Java Functional Interfaces using lambda syntax
|
||||||
as well as that Java users can directly implement Scala functions using lambda
|
as well as that Java users can directly implement Scala functions using lambda
|
||||||
syntax.
|
syntax.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue