@Override public void stop(ServiceStopContext serviceStopContext) { serviceStopContext.async(serverTransport.closeAsync()); }
public Closeable getReleasingResourcesDelegate() { return () -> { if (serverTransport != null) { serverTransport.releaseResources(); } }; } }
@Override protected void onActorStarting() { final ActorFuture<ServerInputSubscription> openFuture = serverTransport.openSubscription("subscriptionRequestHandler", messageHandler, null); actor.runOnCompletion( openFuture, (subscription, throwable) -> { if (throwable != null) { throw new RuntimeException(throwable); } else { actor.consume( subscription, () -> { if (subscription.poll() == 0) { actor.yield(); } }); } }); }
public BufferingServerTransport buildBuffering(Dispatcher receiveBuffer) { remoteAddressList = new RemoteAddressListImpl(); receiveHandler(new ReceiveBufferHandler(receiveBuffer)); validate(); final ServerActorContext actorContext = new ServerActorContext(); final Sender sender = new Sender(actorContext, messageMemoryPool, null, null); output = new ServerOutputImpl(sender); final TransportContext context = buildTransportContext(); context.setReceiveBuffer(receiveBuffer); actorContext.setMetricsManager(scheduler.getMetricsManager()); buildActors(context, actorContext); return new BufferingServerTransport(actorContext, context); }
@Override protected void onActorStarting() { final ActorFuture<ServerInputSubscription> openFuture = serverTransport.openSubscription("subscriptionRequestHandler", messageHandler, null); actor.runOnCompletion( openFuture, (subscription, throwable) -> { if (throwable != null) { throw new RuntimeException(throwable); } else { actor.consume( subscription, () -> { if (subscription.poll() == 0) { actor.yield(); } }); } }); }
public BufferingServerTransport buildBuffering(Dispatcher receiveBuffer) { remoteAddressList = new RemoteAddressListImpl(); receiveHandler(new ReceiveBufferHandler(receiveBuffer)); validate(); final ServerActorContext actorContext = new ServerActorContext(); final Sender sender = new Sender(actorContext, messageMemoryPool, null, null); output = new ServerOutputImpl(sender); final TransportContext context = buildTransportContext(); context.setReceiveBuffer(receiveBuffer); actorContext.setMetricsManager(scheduler.getMetricsManager()); buildActors(context, actorContext); return new BufferingServerTransport(actorContext, context); }
@Override protected void onActorStarting() { pushDeploymentRequestHandler = new PushDeploymentRequestHandler(leaderForPartitions, actor); final ActorFuture<ServerInputSubscription> subscriptionFuture = serverTransport.openSubscription("leader-management-request-handler", this, this); actor.runOnCompletion( subscriptionFuture, (subscription, err) -> { if (err != null) { throw new RuntimeException(err); } else { actor.consume( subscription, () -> { if (subscription.poll() == 0) { actor.yield(); } }); } }); }
public Closeable getReleasingResourcesDelegate() { return () -> { if (serverTransport != null) { serverTransport.releaseResources(); } }; } }
@Override public void stop(ServiceStopContext serviceStopContext) { serviceStopContext.async(serverTransport.closeAsync()); }
@Override protected void onActorStarting() { pushDeploymentRequestHandler = new PushDeploymentRequestHandler(leaderForPartitions, actor); final ActorFuture<ServerInputSubscription> subscriptionFuture = serverTransport.openSubscription("leader-management-request-handler", this, this); actor.runOnCompletion( subscriptionFuture, (subscription, err) -> { if (err != null) { throw new RuntimeException(err); } else { actor.consume( subscription, () -> { if (subscription.poll() == 0) { actor.yield(); } }); } }); }
@Override protected void onActorStarting() { final ActorFuture<ServerInputSubscription> openSubscriptionFuture = serverTransport.openSubscription("gossip", null, requestHandler);
@Override protected void onActorStarting() { final ActorFuture<ServerInputSubscription> openSubscriptionFuture = serverTransport.openSubscription("gossip", null, requestHandler);