Class: Fluent::Plugin::NetflowipfixInput::PortConnection
- Inherits:
-
Object
- Object
- Fluent::Plugin::NetflowipfixInput::PortConnection
- Defined in:
- lib/fluent/plugin/in_netflowipfix.rb
Instance Method Summary collapse
- #bind ⇒ Object
-
#event_pop ⇒ Object
def stop.
- #event_queue_length ⇒ Object
-
#initialize(bind, port, tag, cache_ttl, definitions, queuesleep, log) ⇒ PortConnection
constructor
A new instance of PortConnection.
- #port ⇒ Object
- #start ⇒ Object
-
#stop ⇒ Object
def start.
- #tag ⇒ Object
Constructor Details
#initialize(bind, port, tag, cache_ttl, definitions, queuesleep, log) ⇒ PortConnection
Returns a new instance of PortConnection.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/fluent/plugin/in_netflowipfix.rb', line 33 def initialize(bind, port, tag, cache_ttl, definitions, queuesleep, log) @bind = bind @port = port @tag = tag @cache_ttl = cache_ttl @definitions = definitions @eventQueue = Queue.new @udpQueue = Queue.new @queuesleep = queuesleep @log = log end |
Instance Method Details
#bind ⇒ Object
45 46 47 |
# File 'lib/fluent/plugin/in_netflowipfix.rb', line 45 def bind @bind end |
#event_pop ⇒ Object
def stop
68 69 70 |
# File 'lib/fluent/plugin/in_netflowipfix.rb', line 68 def event_pop @eventQueue.pop end |
#event_queue_length ⇒ Object
72 73 74 |
# File 'lib/fluent/plugin/in_netflowipfix.rb', line 72 def event_queue_length @eventQueue.length end |
#port ⇒ Object
48 49 50 |
# File 'lib/fluent/plugin/in_netflowipfix.rb', line 48 def port @port end |
#start ⇒ Object
55 56 57 58 59 60 |
# File 'lib/fluent/plugin/in_netflowipfix.rb', line 55 def start @thread_udp = UdpListenerThread.new(@bind, @port, @udpQueue, @tag, @log) @thread_parser = ParserThread.new(@udpQueue, @queuesleep, @eventQueue, @cache_ttl, @definitions, @log) @thread_udp.start @thread_parser.start end |
#stop ⇒ Object
def start
61 62 63 64 65 66 |
# File 'lib/fluent/plugin/in_netflowipfix.rb', line 61 def stop @thread_udp.close @thread_udp.join @thread_parser.close @thread_parser.join end |
#tag ⇒ Object
51 52 53 |
# File 'lib/fluent/plugin/in_netflowipfix.rb', line 51 def tag @tag end |