Class PeerToPeerClient
java.lang.Object
com.atlassian.bamboo.cluster.peertopeer.PeerToPeerClient
Client for peer-to-peer gRPC communication between nodes.
- Since:
- 9.5
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a response from a peer node. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPeerToPeerClient(BambooClusterNodeHeartbeatService bambooClusterNodeHeartbeatService, com.atlassian.event.api.EventPublisher eventPublisher, GrpcChannelService grpcChannelService) -
Method Summary
Modifier and TypeMethodDescription<T> @NotNull List<PeerToPeerClient.Response<T>>ask(Function<PeerToPeerCommunicationServiceGrpc.PeerToPeerCommunicationServiceFutureStub, com.google.common.util.concurrent.ListenableFuture<T>> request) protected @NotNull Pair<io.grpc.ManagedChannel,PeerToPeerCommunicationServiceGrpc.PeerToPeerCommunicationServiceFutureStub> createChannelAndStub(@NotNull BambooNodeStatus node) voiddestroy()voidonNodeBecameLive(@NotNull NodeBecameLiveEvent event) voidonNodeBecameOffline(@NotNull NodeBecameOfflineEvent event) void
-
Field Details
-
clientExecutor
-
-
Constructor Details
-
PeerToPeerClient
@Inject public PeerToPeerClient(BambooClusterNodeHeartbeatService bambooClusterNodeHeartbeatService, com.atlassian.event.api.EventPublisher eventPublisher, GrpcChannelService grpcChannelService)
-
-
Method Details
-
registerEventPublisher
@PostConstruct public void registerEventPublisher() -
destroy
- Throws:
Exception
-
onNodeBecameLive
-
onNodeBecameOffline
-
ask
@NotNull public <T> @NotNull List<PeerToPeerClient.Response<T>> ask(Function<PeerToPeerCommunicationServiceGrpc.PeerToPeerCommunicationServiceFutureStub, com.google.common.util.concurrent.ListenableFuture<T>> request) -
createChannelAndStub
@NotNull protected @NotNull Pair<io.grpc.ManagedChannel,PeerToPeerCommunicationServiceGrpc.PeerToPeerCommunicationServiceFutureStub> createChannelAndStub(@NotNull @NotNull BambooNodeStatus node)
-