热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

akka.actor.PoisonPill.getInstance()方法的使用及代码示例

本文整理了Java中akka.actor.PoisonPill.getInstance()方法的一些代码示例,展示了PoisonPill.getInstance()的具体用法。这些代码示例主要来源于G

本文整理了Java中akka.actor.PoisonPill.getInstance()方法的一些代码示例,展示了PoisonPill.getInstance()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PoisonPill.getInstance()方法的具体详情如下:
包路径:akka.actor.PoisonPill
类名称:PoisonPill
方法名:getInstance

PoisonPill.getInstance介绍

暂无

代码示例

代码示例来源:origin: apache/usergrid

@Override
public void produceRouter(ActorSystem system, String role) {
ClusterSingletonManagerSettings settings =
ClusterSingletonManagerSettings.create( system ).withRole( "io" );
system.actorOf( ClusterSingletonManager.props(
Props.create( GuiceActorProducer.class, QueueWriterRouter.class ),
PoisonPill.getInstance(), settings ), "queueWriterRouter" );
ClusterSingletonProxySettings proxySettings =
ClusterSingletonProxySettings.create( system ).withRole( role );
system.actorOf(
ClusterSingletonProxy.props( "/user/queueWriterRouter", proxySettings ), "queueWriterRouterProxy" );
}

代码示例来源:origin: apache/usergrid

@Override
public void produceRouter(ActorSystem system, String role) {
ClusterSingletonManagerSettings settings =
ClusterSingletonManagerSettings.create( system ).withRole( "io" );
system.actorOf( ClusterSingletonManager.props(
Props.create( GuiceActorProducer.class, QueueSenderRouter.class ),
PoisonPill.getInstance(), settings ), "queueSenderRouter" );
ClusterSingletonProxySettings proxySettings =
ClusterSingletonProxySettings.create( system ).withRole( role );
system.actorOf(
ClusterSingletonProxy.props( "/user/queueSenderRouter", proxySettings ), "queueSenderRouterProxy" );
}

代码示例来源:origin: apache/usergrid

@Override
public void produceRouter(ActorSystem system, String role) {
ClusterSingletonManagerSettings settings =
ClusterSingletonManagerSettings.create( system ).withRole( "io" );
system.actorOf( ClusterSingletonManager.props(
Props.create( GuiceActorProducer.class, QueueActorRouter.class ),
PoisonPill.getInstance(), settings ), "queueActorRouter" );
ClusterSingletonProxySettings proxySettings =
ClusterSingletonProxySettings.create( system ).withRole( role );
system.actorOf(
ClusterSingletonProxy.props( "/user/queueActorRouter", proxySettings ), "queueActorRouterProxy" );
}

代码示例来源:origin: apache/usergrid

@Override
public void produceRouter( ActorSystem system, String role ) {
ClusterSingletonManagerSettings settings =
ClusterSingletonManagerSettings.create( system ).withRole("io");
system.actorOf( ClusterSingletonManager.props(
Props.create( GuiceActorProducer.class, UniqueValuesRouter.class ),
PoisonPill.getInstance(), settings ), "uvRouter" );
ClusterSingletonProxySettings proxySettings =
ClusterSingletonProxySettings.create( system ).withRole( role );
system.actorOf( ClusterSingletonProxy.props( "/user/uvRouter", proxySettings ), "uvProxy" );
subscribeToReservations( system );
}

代码示例来源:origin: apache/flink

} finally {
if (resourceManager != null) {
resourceManager.tell(PoisonPill.getInstance(), ActorRef.noSender());

代码示例来源:origin: apache/flink

leadingJM.tell(PoisonPill.getInstance());

代码示例来源:origin: apache/flink

jmGateway.tell(PoisonPill.getInstance());

代码示例来源:origin: opendaylight/controller

@Override
public void close() {
if (rpcManager != null) {
LOG.info("Stopping RPC Manager at {}", rpcManager);
rpcManager.tell(PoisonPill.getInstance(), ActorRef.noSender());
rpcManager = null;
}
}

代码示例来源:origin: apache/bahir-flink

@Override
public void close() {
LOG.info("Closing source");
if (receiverActorSystem != null) {
receiverActor.tell(PoisonPill.getInstance(), ActorRef.noSender());
receiverActorSystem.terminate();
}
}

代码示例来源:origin: org.apache.bahir/flink-connector-akka

@Override
public void close() {
LOG.info("Closing source");
if (receiverActorSystem != null) {
receiverActor.tell(PoisonPill.getInstance(), ActorRef.noSender());
receiverActorSystem.shutdown();
}
}

代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore

private void switchBehavior(final AbstractClientActorBehavior nextBehavior) {
if (!currentBehavior.equals(nextBehavior)) {
if (nextBehavior == null) {
LOG.debug("{}: shutting down", persistenceId());
self().tell(PoisonPill.getInstance(), ActorRef.noSender());
} else {
LOG.debug("{}: switched from {} to {}", persistenceId(), currentBehavior, nextBehavior);
}
currentBehavior = nextBehavior;
}
}

代码示例来源:origin: org.apache.flink/flink-runtime_2.11

@Override
public void handleError(Exception exception) {
LOG.error("Error occurred in the LeaderRetrievalService.", exception);
getSelf().tell(decorateMessage(PoisonPill.getInstance()), getSelf());
}

代码示例来源:origin: opendaylight/controller

private void switchBehavior(final AbstractClientActorBehavior nextBehavior) {
if (!currentBehavior.equals(nextBehavior)) {
if (nextBehavior == null) {
LOG.debug("{}: shutting down", persistenceId());
self().tell(PoisonPill.getInstance(), ActorRef.noSender());
} else {
LOG.debug("{}: switched from {} to {}", persistenceId(), currentBehavior, nextBehavior);
}
currentBehavior.close();
currentBehavior = nextBehavior;
}
}

代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore

void removeCommitCohort(final ActorRef sender, final RemoveCohort message) {
final ActorRef cohort = message.getCohort();
final RegistrationTreeNode node = cohortToNode.get(cohort);
if (node != null) {
removeRegistration(node, cohort);
cohortToNode.remove(cohort);
}
sender.tell(new Status.Success(null), ActorRef.noSender());
cohort.tell(PoisonPill.getInstance(), cohort);
}

代码示例来源:origin: org.eclipse.ditto/ditto-services-amqpbridge-messaging

private void stopSelf() {
log.debug("Shutting down");
// stop the supervisor (otherwise it'd restart this actor) which causes this actor to stop, too.
getContext().getParent().tell(PoisonPill.getInstance(), getSelf());
}

代码示例来源:origin: org.eclipse.ditto/ditto-services-things-persistence

private void shutdown(final String shutdownLogTemplate, final String thingId) {
log.debug(shutdownLogTemplate, thingId);
// stop the supervisor (otherwise it'd restart this actor) which causes this actor to stop, too.
getContext().getParent().tell(PoisonPill.getInstance(), getSelf());
}

代码示例来源:origin: org.eclipse.ditto/ditto-services-connectivity-messaging

private void stopSelf() {
log.debug("Shutting down");
// stop the supervisor (otherwise it'd restart this actor) which causes this actor to stop, too.
getContext().getParent().tell(PoisonPill.getInstance(), getSelf());
}

代码示例来源:origin: eclipse/ditto

private void stopSelf() {
log.debug("Shutting down");
// stop the supervisor (otherwise it'd restart this actor) which causes this actor to stop, too.
getContext().getParent().tell(PoisonPill.getInstance(), getSelf());
}

代码示例来源:origin: org.eclipse.ditto/ditto-services-thingsearch-updater-actors

private void startClusterSingletonActor(final String actorName, final Props props) {
final ClusterSingletonManagerSettings settings =
ClusterSingletonManagerSettings.create(getContext().system()).withRole(ConfigKeys.SEARCH_ROLE);
getContext().actorOf(ClusterSingletonManager.props(props, PoisonPill.getInstance(), settings), actorName);
}

代码示例来源:origin: org.opendaylight.controller/sal-distributed-datastore

private void closeListenerRegistration() {
registration.close();
if(isValidSender(getSender())) {
getSender().tell(CloseDataChangeListenerRegistrationReply.INSTANCE, getSelf());
}
getSelf().tell(PoisonPill.getInstance(), getSelf());
}

推荐阅读
author-avatar
上当受骗的家_908
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有