本文整理匯總了Java中akka.actor.Props.create方法的典型用法代碼示例。如果您正苦於以下問題:Java Props.create方法的具體用法?Java Props.create怎麽用?Java Props.create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類akka.actor.Props
的用法示例。
在下文中一共展示了Props.create方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: printerProps
import akka.actor.Props; //導入方法依賴的package包/類
private static Props printerProps(ActorRef coffeeHouse) {
return Props.create(AbstractLoggingActor.class, () -> new AbstractLoggingActor() {
@Override
public Receive createReceive() {
return receiveBuilder().matchAny(o -> log().info(o.toString())).build();
}
{
coffeeHouse.tell("Brew Coffee", self());
}
});
}
示例2: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props(@Nonnull final MemberName memberName, @Nonnull final String storeName,
final ActorContext ctx, final String shardName) {
final String name = "datastore-" + storeName;
final FrontendIdentifier frontendId = FrontendIdentifier.create(memberName, FrontendType.forName(name));
return Props.create(SimpleDataStoreClientActor.class,
() -> new SimpleDataStoreClientActor(frontendId, ctx, shardName));
}
示例3: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props(FiniteDuration prepareCoffeeDuration) {
return Props.create(Barista.class, () -> new Barista(prepareCoffeeDuration));
}
示例4: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props(ActorRef coffeeHouse, ActorRef barista, int maxComplaintCount) {
return Props.create(Waiter.class, () -> new Waiter(coffeeHouse, barista, maxComplaintCount));
}
示例5: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props() {
return Props.create(DataTreeNotificationListenerRegistrationActor.class);
}
開發者ID:hashsdn,項目名稱:hashsdn-controller,代碼行數:4,代碼來源:DataTreeNotificationListenerRegistrationActor.java
示例6: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props(final ActorRef waiter, final Coffee favoriteCoffee,
final FiniteDuration finishCoffeeDuration, final int caffeineLimit) {
return Props.create(Guest.class,
() -> new Guest(waiter, favoriteCoffee, finishCoffeeDuration, caffeineLimit));
}
示例7: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props() {
return Props.create(CoffeeHouse.class, CoffeeHouse::new);
}
示例8: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props(int caffeineLimit) {
return Props.create(CoffeeHouse.class, () -> new CoffeeHouse(caffeineLimit));
}
示例9: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props(final Coffee favoriteCoffee, final FiniteDuration finishCoffeeDuration, final int caffeineLimit) {
return Props.create(Guest.class, () -> new Guest(favoriteCoffee, finishCoffeeDuration, caffeineLimit));
}
示例10: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props() {
return Props.create(ReplicatedCache.class);
}
示例11: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props() {
return Props.create(MultiplierActor.class);
}
示例12: props
import akka.actor.Props; //導入方法依賴的package包/類
public static Props props() {
return Props.create(ShardSnapshotActor.class);
}
示例13: props
import akka.actor.Props; //導入方法依賴的package包/類
static Props props() {
return Props.create(StreamActor.class, () -> new StreamActor());
}