File tree Expand file tree Collapse file tree 4 files changed +6
-12
lines changed
Expand file tree Collapse file tree 4 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 2121#include < time.h> /* time */
2222
2323#include < algorithm>
24- #include < boost/random/uniform_int_distribution.hpp>
2524
2625namespace pulsar {
2726
@@ -47,7 +46,7 @@ TimeDuration Backoff::next() {
4746 }
4847 }
4948 // Add Randomness
50- boost::random ::uniform_int_distribution<int > dist;
49+ std ::uniform_int_distribution<int > dist;
5150 int randomNumber = dist (rng_);
5251
5352 current = current - (current * (randomNumber % 10 ) / 100 );
Original file line number Diff line number Diff line change 2121#include < pulsar/defines.h>
2222
2323#include < boost/date_time/posix_time/posix_time.hpp>
24- #include < boost/ random/mersenne_twister.hpp >
24+ #include < random>
2525
2626namespace pulsar {
2727
@@ -39,7 +39,7 @@ class PULSAR_PUBLIC Backoff {
3939 TimeDuration next_;
4040 TimeDuration mandatoryStop_;
4141 boost::posix_time::ptime firstBackoffTime_;
42- boost::random ::mt19937 rng_;
42+ std ::mt19937 rng_;
4343 bool mandatoryStopMade_ = false ;
4444
4545 friend class PulsarFriend ;
Original file line number Diff line number Diff line change 1818 */
1919#include " RoundRobinMessageRouter.h"
2020
21- #include < boost/random/mersenne_twister.hpp>
22- #include < boost/random/uniform_int_distribution.hpp>
21+ #include < random>
2322
2423#include " Hash.h"
2524#include " TimeUtils.h"
@@ -37,8 +36,8 @@ RoundRobinMessageRouter::RoundRobinMessageRouter(ProducerConfiguration::HashingS
3736 lastPartitionChange_(TimeUtils::currentTimeMillis()),
3837 msgCounter_(0 ),
3938 cumulativeBatchSize_(0 ) {
40- boost::random ::mt19937 rng (time (nullptr ));
41- boost::random ::uniform_int_distribution<int > dist;
39+ std ::mt19937 rng (time (nullptr ));
40+ std ::uniform_int_distribution<int > dist;
4241 currentPartitionCursor_ = dist (rng);
4342}
4443
Original file line number Diff line number Diff line change 3636 "name" : " boost-property-tree" ,
3737 "version>=" : " 1.83.0"
3838 },
39- {
40- "name" : " boost-random" ,
41- "version>=" : " 1.83.0"
42- },
4339 {
4440 "name" : " boost-serialization" ,
4541 "version>=" : " 1.83.0"
You can’t perform that action at this time.
0 commit comments