document creator requirement, see #2131
This commit is contained in:
parent
0bb72ef692
commit
178c9145fe
5 changed files with 24 additions and 0 deletions
|
|
@ -87,6 +87,8 @@ object Props {
|
|||
* Props is a ActorRef configuration object, that is thread safe and fully sharable.
|
||||
* Used when creating new actors through; <code>ActorSystem.actorOf</code> and <code>ActorContext.actorOf</code>.
|
||||
*
|
||||
* In case of providing code which creates the actual Actor instance, that must not return the same instance multiple times.
|
||||
*
|
||||
* Examples on Scala API:
|
||||
* {{{
|
||||
* val props = Props[MyActor]
|
||||
|
|
@ -144,6 +146,8 @@ case class Props(
|
|||
|
||||
/**
|
||||
* Returns a new Props with the specified creator set.
|
||||
*
|
||||
* The creator must not return the same instance multiple times.
|
||||
*
|
||||
* Scala API.
|
||||
*/
|
||||
|
|
@ -152,6 +156,8 @@ case class Props(
|
|||
/**
|
||||
* Returns a new Props with the specified creator set.
|
||||
*
|
||||
* The creator must not return the same instance multiple times.
|
||||
*
|
||||
* Java API.
|
||||
*/
|
||||
def withCreator(c: Creator[Actor]): Props = copy(creator = () ⇒ c.create)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue