proxygen
wangle::ObservingPipelineFactory< T, R, P > Class Template Reference

#include <ObservingHandler.h>

Inheritance diagram for wangle::ObservingPipelineFactory< T, R, P >:
wangle::RoutingDataPipelineFactory< ObservingPipeline< T >, R >

Public Member Functions

 ObservingPipelineFactory (std::shared_ptr< ServerPool< R, P >> serverPool, std::shared_ptr< BroadcastPipelineFactory< T, R >> broadcastPipelineFactory)
 
ObservingPipeline< T >::Ptr newPipeline (std::shared_ptr< folly::AsyncTransportWrapper > socket, const R &routingData, RoutingDataHandler< R > *, std::shared_ptr< TransportInfo > transportInfo) override
 
virtual BroadcastPool< T, R, P > * broadcastPool (std::shared_ptr< BaseClientBootstrapFactory<>> clientFactory=nullptr)
 
- Public Member Functions inherited from wangle::RoutingDataPipelineFactory< ObservingPipeline< T >, R >
virtual ~RoutingDataPipelineFactory ()
 

Protected Attributes

std::shared_ptr< ServerPool< R, P > > serverPool_
 
std::shared_ptr< BroadcastPipelineFactory< T, R > > broadcastPipelineFactory_
 
folly::ThreadLocalPtr< BroadcastPool< T, R, P > > broadcastPool_
 

Detailed Description

template<typename T, typename R, typename P = DefaultPipeline>
class wangle::ObservingPipelineFactory< T, R, P >

Definition at line 74 of file ObservingHandler.h.

Constructor & Destructor Documentation

template<typename T, typename R, typename P = DefaultPipeline>
wangle::ObservingPipelineFactory< T, R, P >::ObservingPipelineFactory ( std::shared_ptr< ServerPool< R, P >>  serverPool,
std::shared_ptr< BroadcastPipelineFactory< T, R >>  broadcastPipelineFactory 
)
inline

Definition at line 77 of file ObservingHandler.h.

80  : serverPool_(serverPool),
81  broadcastPipelineFactory_(broadcastPipelineFactory) {}
std::shared_ptr< BroadcastPipelineFactory< T, R > > broadcastPipelineFactory_
std::shared_ptr< ServerPool< R, P > > serverPool_

Member Function Documentation

template<typename T, typename R, typename P = DefaultPipeline>
virtual BroadcastPool<T, R, P>* wangle::ObservingPipelineFactory< T, R, P >::broadcastPool ( std::shared_ptr< BaseClientBootstrapFactory<>>  clientFactory = nullptr)
inlinevirtual

Definition at line 100 of file ObservingHandler.h.

Referenced by TEST_F().

101  {
102  if (!broadcastPool_) {
103  if (clientFactory) {
104  broadcastPool_.reset(new BroadcastPool<T, R, P>(
105  serverPool_, broadcastPipelineFactory_, clientFactory));
106  } else {
107  broadcastPool_.reset(
108  new BroadcastPool<T, R, P>(serverPool_, broadcastPipelineFactory_));
109  }
110  }
111  return broadcastPool_.get();
112  }
std::shared_ptr< BroadcastPipelineFactory< T, R > > broadcastPipelineFactory_
std::shared_ptr< ServerPool< R, P > > serverPool_
folly::ThreadLocalPtr< BroadcastPool< T, R, P > > broadcastPool_
template<typename T, typename R, typename P = DefaultPipeline>
ObservingPipeline<T>::Ptr wangle::ObservingPipelineFactory< T, R, P >::newPipeline ( std::shared_ptr< folly::AsyncTransportWrapper socket,
const R &  routingData,
RoutingDataHandler< R > *  ,
std::shared_ptr< TransportInfo transportInfo 
)
inlineoverridevirtual

Implements wangle::RoutingDataPipelineFactory< ObservingPipeline< T >, R >.

Definition at line 83 of file ObservingHandler.h.

87  {
88  auto pipeline = ObservingPipeline<T>::create();
89  pipeline->addBack(AsyncSocketHandler(socket));
90  auto handler = std::make_shared<ObservingHandler<T, R, P>>(
91  routingData, broadcastPool());
92  pipeline->addBack(handler);
93  pipeline->finalize();
94 
95  pipeline->setTransportInfo(transportInfo);
96 
97  return pipeline;
98  }
void handler(int, siginfo_t *, void *)
NetworkSocket socket(int af, int type, int protocol)
Definition: NetOps.cpp:412
static Ptr create()
Definition: Pipeline.h:174
virtual BroadcastPool< T, R, P > * broadcastPool(std::shared_ptr< BaseClientBootstrapFactory<>> clientFactory=nullptr)

Member Data Documentation

template<typename T, typename R, typename P = DefaultPipeline>
std::shared_ptr<BroadcastPipelineFactory<T, R> > wangle::ObservingPipelineFactory< T, R, P >::broadcastPipelineFactory_
protected

Definition at line 116 of file ObservingHandler.h.

template<typename T, typename R, typename P = DefaultPipeline>
folly::ThreadLocalPtr<BroadcastPool<T, R, P> > wangle::ObservingPipelineFactory< T, R, P >::broadcastPool_
protected

Definition at line 117 of file ObservingHandler.h.

template<typename T, typename R, typename P = DefaultPipeline>
std::shared_ptr<ServerPool<R, P> > wangle::ObservingPipelineFactory< T, R, P >::serverPool_
protected

Definition at line 115 of file ObservingHandler.h.


The documentation for this class was generated from the following file: