Skip to content

Commit 4ea79d6

Browse files
committed
rename InitialConnectionChannelFactory to ConnectionChannelFactory
Signed-off-by: Emelia Lei <[email protected]>
1 parent de6843b commit 4ea79d6

File tree

8 files changed

+121
-126
lines changed

8 files changed

+121
-126
lines changed

src/groups/bmq/bmqimp/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ its components directly, but rather use the accessor public APIs from 'bmqa'.
1313

1414
Component Synopsis
1515
------------------
16-
Component | Provides ...
17-
-----------------------------------------|-----------------------------------------------------------
18-
`bmqimp_application` | the top level object to manipulate a session with bmqbrkr.
19-
`bmqimp_brokersession` | the implementation of a session with the bmqbrkr.
20-
`bmqimp_event` | a value-semantic type representing an event.
21-
`bmqimp_eventqueue` | a thread safe queue of pooled bmqimp::Event items.
22-
`bmqpimp_eventsstats` | a mechanism to keep track of Events statistics.
23-
`bmqpimp_queue` | a type object to represent information about a queue.
24-
`bmqimp_stat` | utilities for stat manipulation.
25-
`bmqimp_initialconnectionchannelfactory` | a channel factory that negotiates with a peer.
16+
Component | Provides ...
17+
----------------------------------|-----------------------------------------------------------
18+
`bmqimp_application` | the top level object to manipulate a session with bmqbrkr.
19+
`bmqimp_brokersession` | the implementation of a session with the bmqbrkr.
20+
`bmqimp_event` | a value-semantic type representing an event.
21+
`bmqimp_eventqueue` | a thread safe queue of pooled bmqimp::Event items.
22+
`bmqpimp_eventsstats` | a mechanism to keep track of Events statistics.
23+
`bmqpimp_queue` | a type object to represent information about a queue.
24+
`bmqimp_stat` | utilities for stat manipulation.
25+
`bmqimp_connectionchannelfactory` | a channel factory that negotiates with a peer.

src/groups/bmq/bmqimp/bmqimp_application.cpp

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// BMQ
2121
#include <bmqex_executionpolicy.h>
2222
#include <bmqex_systemexecutor.h>
23-
#include <bmqimp_initialconnectionchannelfactory.h>
23+
#include <bmqimp_connectionchannelfactory.h>
2424
#include <bmqio_channelutil.h>
2525
#include <bmqio_connectoptions.h>
2626
#include <bmqio_status.h>
@@ -389,7 +389,7 @@ bmqt::GenericResult::Enum Application::startChannel()
389389
.setAttemptInterval(attemptInterval)
390390
.setAutoReconnect(true);
391391

392-
d_initialConnectionChannelFactory.connect(
392+
d_connectionChannelFactory.connect(
393393
&status,
394394
&d_connectHandle_mp,
395395
options,
@@ -603,14 +603,13 @@ Application::Application(
603603
bdlf::PlaceHolders::_2), // handle
604604
allocator),
605605
allocator)
606-
, d_initialConnectionChannelFactory(
607-
InitialConnectionChannelFactoryConfig(
608-
&d_statChannelFactory,
609-
negotiationMessage,
610-
sessionOptions.connectTimeout(),
611-
sessionOptions.credentialProvider().get(),
612-
d_blobSpPool_sp.get(),
613-
allocator),
606+
, d_connectionChannelFactory(
607+
ConnectionChannelFactoryConfig(&d_statChannelFactory,
608+
negotiationMessage,
609+
sessionOptions.connectTimeout(),
610+
sessionOptions.credentialProvider().get(),
611+
d_blobSpPool_sp.get(),
612+
allocator),
614613
allocator)
615614
, d_connectHandle_mp()
616615
, d_brokerSession(&d_scheduler,
@@ -720,17 +719,16 @@ int Application::start(const bsls::TimeInterval& timeout)
720719
<< "::: START (SYNC) << [state: " << d_brokerSession.state()
721720
<< "] :::";
722721

723-
int rc = d_initialConnectionChannelFactory.start();
722+
int rc = d_connectionChannelFactory.start();
724723
if (rc != 0) {
725-
BALL_LOG_ERROR << id()
726-
<< "Failed to start initialConnectionChannelFactory "
724+
BALL_LOG_ERROR << id() << "Failed to start connectionChannelFactory "
727725
<< "[rc: " << rc << "]";
728726
return rc; // RETURN
729727
}
730728

731729
rc = d_brokerSession.start(timeout);
732730
if (rc != 0) {
733-
d_initialConnectionChannelFactory.stop();
731+
d_connectionChannelFactory.stop();
734732
return rc; // RETURN
735733
}
736734

@@ -771,7 +769,7 @@ void Application::stop()
771769
d_brokerSession.stop();
772770

773771
// Stop the channel factories
774-
d_initialConnectionChannelFactory.stop();
772+
d_connectionChannelFactory.stop();
775773
}
776774

777775
void Application::stopAsync()
@@ -791,9 +789,9 @@ Application::createMonitor(const bsl::shared_ptr<bmqio::Channel>& channel)
791789
{
792790
int maxMissedHeartbeats = k_DEFAULT_MAX_MISSED_HEARTBEATS;
793791

794-
channel->properties().load(&maxMissedHeartbeats,
795-
InitialConnectionChannelFactory::
796-
k_CHANNEL_PROPERTY_MAX_MISSED_HEARTBEATS);
792+
channel->properties().load(
793+
&maxMissedHeartbeats,
794+
ConnectionChannelFactory::k_CHANNEL_PROPERTY_MAX_MISSED_HEARTBEATS);
797795

798796
bsl::shared_ptr<bmqp::HeartbeatMonitor> monitor(
799797
new (d_allocator) bmqp::HeartbeatMonitor(maxMissedHeartbeats),
@@ -814,9 +812,9 @@ void Application::startHeartbeat(
814812

815813
int heartbeatIntervalMs = k_DEFAULT_HEARTBEAT_INTERVAL_MS;
816814

817-
channel->properties().load(&heartbeatIntervalMs,
818-
InitialConnectionChannelFactory::
819-
k_CHANNEL_PROPERTY_HEARTBEAT_INTERVAL_MS);
815+
channel->properties().load(
816+
&heartbeatIntervalMs,
817+
ConnectionChannelFactory::k_CHANNEL_PROPERTY_HEARTBEAT_INTERVAL_MS);
820818

821819
bsls::TimeInterval interval;
822820
interval.addMilliseconds(heartbeatIntervalMs);

src/groups/bmq/bmqimp/bmqimp_application.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
// BMQ
3838

3939
#include <bmqimp_brokersession.h>
40+
#include <bmqimp_connectionchannelfactory.h>
4041
#include <bmqimp_eventqueue.h>
41-
#include <bmqimp_initialconnectionchannelfactory.h>
4242
#include <bmqp_ctrlmsg_messages.h>
4343
#include <bmqp_heartbeatmonitor.h>
4444
#include <bmqt_sessionoptions.h>
@@ -134,7 +134,7 @@ class Application {
134134

135135
bmqio::StatChannelFactory d_statChannelFactory;
136136

137-
InitialConnectionChannelFactory d_initialConnectionChannelFactory;
137+
ConnectionChannelFactory d_connectionChannelFactory;
138138

139139
ChannelFactoryOpHandleMp d_connectHandle_mp;
140140

src/groups/bmq/bmqimp/bmqimp_brokersession.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include <bmqscm_version.h>
2020
// BMQ
21-
#include <bmqimp_initialconnectionchannelfactory.h>
21+
#include <bmqimp_connectionchannelfactory.h>
2222
#include <bmqimp_queue.h>
2323
#include <bmqp_ackeventbuilder.h>
2424
#include <bmqp_ackmessageiterator.h>
@@ -407,7 +407,7 @@ void BrokerSession::SessionFsm::setStarted(
407407
// Temporary safety switch to control configure request.
408408
d_session.d_channel_sp->properties().load(
409409
&d_session.d_doConfigureStream,
410-
InitialConnectionChannelFactory::k_CHANNEL_PROPERTY_CONFIGURE_STREAM);
410+
ConnectionChannelFactory::k_CHANNEL_PROPERTY_CONFIGURE_STREAM);
411411
}
412412

413413
bmqt::GenericResult::Enum
@@ -6051,7 +6051,7 @@ void BrokerSession::onOpenQueueResponse(
60516051

60526052
if (d_channel_sp->properties().load(
60536053
&isMPsEx,
6054-
InitialConnectionChannelFactory::k_CHANNEL_PROPERTY_MPS_EX)) {
6054+
ConnectionChannelFactory::k_CHANNEL_PROPERTY_MPS_EX)) {
60556055
BSLS_ASSERT_SAFE(isMPsEx);
60566056
queue->setOldStyle(false);
60576057
}

0 commit comments

Comments
 (0)