Class: Druid::Context

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/druid/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Context

Returns a new instance of Context.



27
28
29
30
# File 'lib/druid/context.rb', line 27

def initialize(attributes = {})
  super
  @queryId ||= SecureRandom.uuid
end

Instance Attribute Details

#bySegmentObject

Returns the value of attribute bySegment.



19
20
21
# File 'lib/druid/context.rb', line 19

def bySegment
  @bySegment
end

#chunkPeriodObject

Returns the value of attribute chunkPeriod.



25
26
27
# File 'lib/druid/context.rb', line 25

def chunkPeriod
  @chunkPeriod
end

#finalizeObject

Returns the value of attribute finalize.



22
23
24
# File 'lib/druid/context.rb', line 22

def finalize
  @finalize
end

#populateCacheObject

Returns the value of attribute populateCache.



16
17
18
# File 'lib/druid/context.rb', line 16

def populateCache
  @populateCache
end

#priorityObject

Returns the value of attribute priority.



8
9
10
# File 'lib/druid/context.rb', line 8

def priority
  @priority
end

#queryIdObject

Returns the value of attribute queryId.



11
12
13
# File 'lib/druid/context.rb', line 11

def queryId
  @queryId
end

#timeoutObject

Returns the value of attribute timeout.



5
6
7
# File 'lib/druid/context.rb', line 5

def timeout
  @timeout
end

#useCacheObject

Returns the value of attribute useCache.



13
14
15
# File 'lib/druid/context.rb', line 13

def useCache
  @useCache
end

Instance Method Details

#as_json(options = {}) ⇒ Object



32
33
34
# File 'lib/druid/context.rb', line 32

def as_json(options = {})
  super(options.merge(except: %w(errors validation_context)))
end