Class: Fluent::Plugin::MetadataCache

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ MetadataCache

Returns a new instance of MetadataCache.



1669
1670
1671
1672
1673
1674
# File 'lib/fluent/plugin/output.rb', line 1669

def initialize
  @timekey = nil
  @tag = nil
  @variables = nil
  @metadata = nil
end

Instance Attribute Details

#metadata ⇒ Object (readonly)

Returns the value of attribute metadata.



1667
1668
1669
# File 'lib/fluent/plugin/output.rb', line 1667

def 
  @metadata
end

Instance Method Details

#cached?(timekey:, tag:, variables: nil) ⇒ Boolean

Returns:

  • (Boolean)


1676
1677
1678
# File 'lib/fluent/plugin/output.rb', line 1676

def cached?(timekey:, tag:, variables: nil)
  @metadata && @timekey == timekey && @tag == tag && @variables == variables
end

#update(timekey:, tag:, variables: nil, metadata:) ⇒ Object



1680
1681
1682
1683
1684
1685
# File 'lib/fluent/plugin/output.rb', line 1680

def update(timekey:, tag:, variables: nil, metadata:)
  @timekey = timekey
  @tag = tag
  @variables = variables
  @metadata = 
end