pipeline handler removal, fix service test
[folly.git] / folly / wangle / channel / Pipeline.h
index 174c5d9f1b7512bfd3d77a2b0d801de54410da12..7138ab1c10728759ce80d6a9f70960fbe201cea9 100644 (file)
@@ -126,6 +126,16 @@ class Pipeline : public PipelineBase {
   template <class H>
   Pipeline& addFront(H* handler);
 
+  template <class H>
+  Pipeline& remove(H* handler);
+
+  template <class H>
+  Pipeline& remove();
+
+  Pipeline& removeFront();
+
+  Pipeline& removeBack();
+
   template <class H>
   H* getHandler(int i);
 
@@ -150,6 +160,14 @@ class Pipeline : public PipelineBase {
   template <class Context>
   Pipeline& addHelper(std::shared_ptr<Context>&& ctx, bool front);
 
+  template <class H>
+  Pipeline& removeHelper(H* handler, bool checkEqual);
+
+  typedef std::vector<std::shared_ptr<PipelineContext>>::iterator
+    ContextIterator;
+
+  ContextIterator removeAt(const ContextIterator& it);
+
   WriteFlags writeFlags_{WriteFlags::NONE};
   std::pair<uint64_t, uint64_t> readBufferSettings_{2048, 2048};