本文整理汇总了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());
}