proxygen
|
#include <Mocks.h>
Public Member Functions | |
MockBroadcastPool () | |
MOCK_METHOD1_T (mockGetHandler, folly::MoveWrapper< folly::Future< BroadcastHandler< int, std::string > * >>(const std::string &)) | |
folly::Future< BroadcastHandler< int, std::string > * > | getHandler (const std::string &routingData) override |
Public Member Functions inherited from wangle::BroadcastPool< int, std::string > | |
BroadcastPool (std::shared_ptr< ServerPool< std::string, DefaultPipeline >> serverPool, std::shared_ptr< BroadcastPipelineFactory< int, std::string >> pipelineFactory, std::shared_ptr< BaseClientBootstrapFactory<>> clientFactory=std::make_shared< ClientBootstrapFactory >()) | |
BroadcastPool (const BroadcastPool &)=delete | |
BroadcastPool (BroadcastPool &&)=default | |
virtual | ~BroadcastPool () |
BroadcastPool & | operator= (const BroadcastPool &)=delete |
BroadcastPool & | operator= (BroadcastPool &&)=default |
bool | isBroadcasting (const std::string &routingData) |
virtual void | deleteBroadcast (const std::string &routingData) |
|
inline |
Definition at line 83 of file Mocks.h.
References wangle::MockSubscriber< T, R >::MOCK_METHOD1_T(), and string.
|
inlineoverridevirtual |
Gets the BroadcastHandler, or creates one if it doesn't exist already, for the given routingData.
If a broadcast is already available for the given routingData, returns the BroadcastHandler from the pipeline. If not, an upstream connection is created and stored along with a new broadcast pipeline for this routingData, and its BroadcastHandler is returned.
Caller should immediately subscribe to the returned BroadcastHandler to prevent it from being garbage collected. Note that to ensure that this works correctly, the returned future completes on an InlineExecutor such that .then will be called inline with satisfaction of the underlying promise.
Reimplemented from wangle::BroadcastPool< int, std::string >.
wangle::MockBroadcastPool::MOCK_METHOD1_T | ( | mockGetHandler | , |
folly::MoveWrapper< folly::Future< BroadcastHandler< int, std::string > * >> | const std::string & | ||
) |