proxygen
ServiceConfiguration.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 #pragma once
11 
13 
14 namespace proxygen {
15 
20  public:
22  : writeBufferLimit_(4096)
23 , takeoverEnabled_(false) {}
24 
25  virtual ~ServiceConfiguration() {}
26 
31  const std::list<AcceptorConfiguration> &acceptors) {
32  acceptors_.clear();
33  acceptors_.insert(acceptors_.begin(), acceptors.begin(), acceptors.end());
34  }
35  const std::list<AcceptorConfiguration> &getAcceptors() const {
36  return acceptors_;
37  }
38 
45 
49  void setTakeoverEnabled(bool enabled) { takeoverEnabled_ = enabled; }
50  bool takeoverEnabled() const { return takeoverEnabled_; }
51 
52  private:
53  std::list<AcceptorConfiguration> acceptors_;
56 };
57 
58 }
void setWriteBufferLimit(uint64_t size)
const std::list< AcceptorConfiguration > & getAcceptors() const
std::list< AcceptorConfiguration > acceptors_
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
void setAcceptors(const std::list< AcceptorConfiguration > &acceptors)