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
Modifier and TypeClassDescriptionstatic class
Represents a response from a peer node. -
Field Summary
-
Constructor Summary
ConstructorDescriptionPeerToPeerClient
(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) void
destroy()
void
onNodeBecameLive
(@NotNull NodeBecameLiveEvent event) void
onNodeBecameOffline
(@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)
-