File indexing completed on 2026-04-17 08:35:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #ifndef THRIFT_TCONFIGURATION_H
0021 #define THRIFT_TCONFIGURATION_H
0022
0023 namespace apache {
0024 namespace thrift {
0025
0026 class TConfiguration
0027 {
0028 public:
0029 TConfiguration(int maxMessageSize = DEFAULT_MAX_MESSAGE_SIZE,
0030 int maxFrameSize = DEFAULT_MAX_FRAME_SIZE, int recursionLimit = DEFAULT_RECURSION_DEPTH)
0031 : maxMessageSize_(maxMessageSize), maxFrameSize_(maxFrameSize), recursionLimit_(recursionLimit) {}
0032
0033 const static int DEFAULT_MAX_MESSAGE_SIZE = 100 * 1024 * 1024;
0034 const static int DEFAULT_MAX_FRAME_SIZE = 16384000;
0035 const static int DEFAULT_RECURSION_DEPTH = 64;
0036
0037 inline int getMaxMessageSize() { return maxMessageSize_; }
0038 inline void setMaxMessageSize(int maxMessageSize) { maxMessageSize_ = maxMessageSize; }
0039 inline int getMaxFrameSize() { return maxFrameSize_; }
0040 inline void setMaxFrameSize(int maxFrameSize) { maxFrameSize_ = maxFrameSize; }
0041 inline int getRecursionLimit() { return recursionLimit_; }
0042 inline void setRecursionLimit(int recursionLimit) { recursionLimit_ = recursionLimit; }
0043
0044 private:
0045 int maxMessageSize_ = DEFAULT_MAX_MESSAGE_SIZE;
0046 int maxFrameSize_ = DEFAULT_MAX_FRAME_SIZE;
0047 int recursionLimit_ = DEFAULT_RECURSION_DEPTH;
0048
0049
0050 };
0051 }
0052 }
0053
0054 #endif
0055