@@ -109,8 +109,8 @@ int RemoteQueue::configureAsProxy(bsl::ostream& errorDescription,
109109 // TTL is not applicable at proxy
110110
111111 // Create the associated storage.
112- bslma::ManagedPtr <mqbi::Storage> storageMp ;
113- storageMp .load (new (*d_allocator_p) mqbs::InMemoryStorage (
112+ bsl::shared_ptr <mqbi::Storage> storageSp ;
113+ storageSp .load (new (*d_allocator_p) mqbs::InMemoryStorage (
114114 d_state_p->uri (),
115115 d_state_p->key (),
116116 mqbs::DataStore::k_INVALID_PARTITION_ID,
@@ -125,8 +125,8 @@ int RemoteQueue::configureAsProxy(bsl::ostream& errorDescription,
125125 limits.messages () = bsl::numeric_limits<bsls::Types::Int64>::max ();
126126 limits.bytes () = bsl::numeric_limits<bsls::Types::Int64>::max ();
127127
128- storageMp ->setConsistency (domainCfg.consistency ());
129- int rc = storageMp ->configure (errorDescription,
128+ storageSp ->setConsistency (domainCfg.consistency ());
129+ int rc = storageSp ->configure (errorDescription,
130130 config,
131131 limits,
132132 domainCfg.messageTtl (),
@@ -135,18 +135,18 @@ int RemoteQueue::configureAsProxy(bsl::ostream& errorDescription,
135135 return 10 * rc + rc_STORAGE_CFG_FAILURE; // RETURN
136136 }
137137
138- storageMp ->capacityMeter ()->disable ();
138+ storageSp ->capacityMeter ()->disable ();
139139 // In a remote queue, we don't care about monitoring, so disable it for
140140 // efficiency performance.
141141
142- if (!d_state_p->isStorageCompatible (storageMp )) {
142+ if (!d_state_p->isStorageCompatible (storageSp )) {
143143 errorDescription << " Incompatible storage type for ProxyRemoteQueue "
144144 << " [uri: " << d_state_p->uri ()
145145 << " , id: " << d_state_p->id () << " ]" ;
146146 return rc_INCOMPATIBLE_STORAGE; // RETURN
147147 }
148148
149- d_state_p->setStorage (storageMp );
149+ d_state_p->setStorage (storageSp );
150150
151151 // Create the queueEngine.
152152 d_queueEngine_mp.load (
@@ -195,12 +195,12 @@ int RemoteQueue::configureAsClusterMember(bsl::ostream& errorDescription,
195195 // Only create a storage if this is the initial configure; reconfigure
196196 // (which happens during conversion to local/remote) should reuse the
197197 // previously created storage.
198- bslma::ManagedPtr <mqbi::Storage> storageMp ;
198+ bsl::shared_ptr <mqbi::Storage> storageSp ;
199199 bdlma::LocalSequentialAllocator<1024 > localAllocator (d_allocator_p);
200200 bmqu::MemOutStream errorDesc (&localAllocator);
201201 rc = d_state_p->storageManager ()->makeStorage (
202202 errorDesc,
203- &storageMp ,
203+ &storageSp ,
204204 d_state_p->uri (),
205205 d_state_p->key (),
206206 d_state_p->partitionId (),
@@ -223,10 +223,10 @@ int RemoteQueue::configureAsClusterMember(bsl::ostream& errorDescription,
223223 }
224224
225225 if (d_state_p->isAtMostOnce ()) {
226- storageMp ->capacityMeter ()->disable ();
226+ storageSp ->capacityMeter ()->disable ();
227227 }
228228
229- if (!d_state_p->isStorageCompatible (storageMp )) {
229+ if (!d_state_p->isStorageCompatible (storageSp )) {
230230 BMQTSK_ALARMLOG_ALARM (" CLUSTER_STATE" )
231231 << d_state_p->domain ()->cluster ()->name () << " : Partition ["
232232 << d_state_p->partitionId ()
@@ -236,7 +236,7 @@ int RemoteQueue::configureAsClusterMember(bsl::ostream& errorDescription,
236236 return 10 * rc + rc_QUEUE_CONFIGURE_FAILURE; // RETURN
237237 }
238238
239- d_state_p->setStorage (storageMp );
239+ d_state_p->setStorage (storageSp );
240240
241241 // Create the queueEngine.
242242 d_queueEngine_mp.load (
0 commit comments