Class: Blur::BlurQueryStatus

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/active_blur/thrift/blur_types.rb

Constant Summary collapse

QUERY =
1
CPUTIMES =
2
COMPLETESHARDS =
3
TOTALSHARDS =
4
STATE =
5
UUID =
6
FIELDS =
{
  QUERY => {:type => ::Thrift::Types::STRUCT, :name => 'query', :class => ::Blur::BlurQuery},
  CPUTIMES => {:type => ::Thrift::Types::MAP, :name => 'cpuTimes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Blur::CpuTime}},
  COMPLETESHARDS => {:type => ::Thrift::Types::I32, :name => 'completeShards'},
  TOTALSHARDS => {:type => ::Thrift::Types::I32, :name => 'totalShards'},
  STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => ::Blur::QueryState},
  UUID => {:type => ::Thrift::Types::I64, :name => 'uuid'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



484
# File 'lib/active_blur/thrift/blur_types.rb', line 484

def struct_fields; FIELDS; end

#validateObject



486
487
488
489
490
# File 'lib/active_blur/thrift/blur_types.rb', line 486

def validate
  unless @state.nil? || ::Blur::QueryState::VALID_VALUES.include?(@state)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
  end
end