From 3dfb16c516efcba11d64788c131b77d28c0523e1 Mon Sep 17 00:00:00 2001 From: mjpt777 Date: Thu, 3 Oct 2024 09:21:38 +0100 Subject: [PATCH] [Java] Tidy up. --- .../io/aeron/cluster/ClusterBackupAgent.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java index 5070e81cbc..c119f8c2fa 100644 --- a/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java +++ b/aeron-cluster/src/main/java/io/aeron/cluster/ClusterBackupAgent.java @@ -182,7 +182,8 @@ public void onStart() recordingLog = new RecordingLog(ctx.clusterDir(), true); backupArchive = AeronArchive.connect(ctx.archiveContext().clone()); recordingSignalPoller = new RecordingSignalPoller( - backupArchive.controlSessionId(), backupArchive.controlResponsePoller().subscription()); + backupArchive.controlSessionId(), + backupArchive.controlResponsePoller().subscription()); final long nowMs = epochClock.time(); nextQueryDeadlineMsCounter.setOrdered(nowMs - 1); @@ -565,23 +566,21 @@ else if (!logSourceValidator.isAcceptable(leaderMemberId, memberId)) { CloseHelper.close(clusterArchiveAsyncConnect); - final AeronArchive.Context clusterArchiveContext = ctx.clusterArchiveContext().clone(); - final ChannelUri logSupplierArchiveUri = ChannelUri.parse( - clusterArchiveContext.controlRequestChannel()); + final AeronArchive.Context context = ctx.clusterArchiveContext().clone(); + final ChannelUri logSupplierArchiveUri = ChannelUri.parse(context.controlRequestChannel()); logSupplierArchiveUri.put(ENDPOINT_PARAM_NAME, logSupplierMember.archiveEndpoint()); - clusterArchiveContext.controlRequestChannel(logSupplierArchiveUri.toString()); + context.controlRequestChannel(logSupplierArchiveUri.toString()); if (null != logSupplierMember.archiveResponseEndpoint()) { - final ChannelUri logSupplierResponseUri = ChannelUri.parse( - clusterArchiveContext.controlResponseChannel()); + final ChannelUri logSupplierResponseUri = ChannelUri.parse(context.controlResponseChannel()); logSupplierResponseUri.put(MDC_CONTROL_MODE_PARAM_NAME, CONTROL_MODE_RESPONSE); logSupplierResponseUri.remove(ENDPOINT_PARAM_NAME); logSupplierResponseUri.put(MDC_CONTROL_PARAM_NAME, logSupplierMember.archiveResponseEndpoint()); - clusterArchiveContext.controlResponseChannel(logSupplierResponseUri.toString()); + context.controlResponseChannel(logSupplierResponseUri.toString()); } - clusterArchiveAsyncConnect = AeronArchive.asyncConnect(clusterArchiveContext); + clusterArchiveAsyncConnect = AeronArchive.asyncConnect(context); } final long nowMs = epochClock.time();