Sha256: 361a0c8c89421e8a8a47ee0f076a96cf874a4e4151586b7c720248991618e870
Contents?: true
Size: 799 Bytes
Versions: 16
Compression:
Stored size: 799 Bytes
Contents
# encoding: utf-8 require_relative 'db_object' module LogStash module Filters module Jdbc class SingleLoadRunner attr_reader :local, :loaders, :preloaders def initialize(local, loaders, preloaders) @local = local @loaders = loaders @preloaders = [] @reload_counter = Concurrent::AtomicFixnum.new(0) preloaders.map do |pre| @preloaders << DbObject.new(pre) end @preloaders.sort! end def initial_load do_preload local.populate_all(loaders) @reload_counter.increment end def repeated_load end def reload_count @reload_counter.value end private def do_preload preloaders.each do |db_object| local.build_db_object(db_object) end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems