Class: FlumeNodeStatusThrift

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

Constant Summary collapse

STATE =
1
VERSION =
2
LASTSEEN =
3
LASTSEENDELTAMILLIS =
6
HOST =
4
PHYSICALNODE =
5
FIELDS =
{
  STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => FlumeNodeState},
  VERSION => {:type => ::Thrift::Types::I64, :name => 'version'},
  LASTSEEN => {:type => ::Thrift::Types::I64, :name => 'lastseen'},
  LASTSEENDELTAMILLIS => {:type => ::Thrift::Types::I64, :name => 'lastSeenDeltaMillis'},
  HOST => {:type => ::Thrift::Types::STRING, :name => 'host'},
  PHYSICALNODE => {:type => ::Thrift::Types::STRING, :name => 'physicalNode'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



46
# File 'lib/thrift/mastercontrol_types.rb', line 46

def struct_fields; FIELDS; end

#validateObject



48
49
50
51
52
# File 'lib/thrift/mastercontrol_types.rb', line 48

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