Class: Thrift::BinaryProtocolAcceleratedFactory

Inherits:
BaseProtocolFactory show all
Defined in:
lib/thrift/protocol/binary_protocol_accelerated.rb

Instance Method Summary collapse

Instance Method Details

#get_protocol(trans) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/thrift/protocol/binary_protocol_accelerated.rb', line 31

def get_protocol(trans)
  if (defined? BinaryProtocolAccelerated)
    BinaryProtocolAccelerated.new(trans)
  else
    BinaryProtocol.new(trans)
  end
end

#to_sObject



39
40
41
42
43
44
45
# File 'lib/thrift/protocol/binary_protocol_accelerated.rb', line 39

def to_s
  if (defined? BinaryProtocolAccelerated)
    "binary-accel"
  else
    "binary"
  end
end