Class: LogStash::Inputs::Gemfire

Inherits:
Threadable
  • Object
show all
Defined in:
lib/logstash/inputs/gemfire.rb

Overview

Push events to a GemFire region.

GemFire is an object database.

To use this plugin you need to add gemfire.jar to your CLASSPATH. Using format=json requires jackson.jar too; use of continuous queries requires antlr.jar.

Note: this plugin has only been tested with GemFire 7.0.

Instance Method Summary collapse

Instance Method Details

#registerObject



58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/logstash/inputs/gemfire.rb', line 58

def register
  import com.gemstone.gemfire.cache.AttributesMutator
  import com.gemstone.gemfire.cache.InterestResultPolicy
  import com.gemstone.gemfire.cache.client.ClientCacheFactory
  import com.gemstone.gemfire.cache.client.ClientRegionShortcut
  import com.gemstone.gemfire.cache.query.CqQuery
  import com.gemstone.gemfire.cache.query.CqAttributes
  import com.gemstone.gemfire.cache.query.CqAttributesFactory
  import com.gemstone.gemfire.cache.query.QueryService
  import com.gemstone.gemfire.cache.query.SelectResults
  import com.gemstone.gemfire.pdx.JSONFormatter

  @logger.info("Registering input", :plugin => self)
end

#run(queue) ⇒ Object

def register



73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/logstash/inputs/gemfire.rb', line 73

def run(queue)
  return if terminating?
  connect

  @logstash_queue = queue

  if @query
    continuous_query(@query)
  else
    register_interest(@interest_regexp)
  end
end