Class: LogStash::Inputs::Gemfire
- Inherits:
-
Threadable
- Object
- Plugin
- Base
- Threadable
- LogStash::Inputs::Gemfire
- 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.
Constant Summary
Constants included from Config::Mixin
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Config::Mixin
Attributes inherited from Plugin
Instance Method Summary collapse
- #register ⇒ Object
-
#run(queue) ⇒ Object
def register.
-
#teardown ⇒ Object
def run.
Methods inherited from Threadable
Methods inherited from Base
Methods included from Config::Mixin
Methods inherited from Plugin
#eql?, #finished, #finished?, #hash, #initialize, #inspect, lookup, #reload, #running?, #shutdown, #terminating?, #to_s
Constructor Details
This class inherits a constructor from LogStash::Inputs::Threadable
Instance Method Details
#register ⇒ Object
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 |
#teardown ⇒ Object
def run
86 87 88 89 90 |
# File 'lib/logstash/inputs/gemfire.rb', line 86 def teardown @cache.close if @cache @cache = nil finished end |