Search code examples
typesthriftmasking

Use method name 'set' in thrift defintion


I want to define a method set() within my thrift definition:

 string set(1:string key, i32 secondsToLive)

I know set ist a predefined thrift type. Is there any way to mask the method name to tell thrift that this is just a name and has nothing to do with the data type set?


Solution

  • Thrift does not support this feature. The solution is not use the reserved language keyword. Thrift is a cross-language tool, and set is indeed a keyword in some of them.