Sha256: a5e930ce215061555993c735f818311887d84cdbd746f5007f76b8575869a4d3
Contents?: true
Size: 841 Bytes
Versions: 30
Compression:
Stored size: 841 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 call 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
30 entries across 30 versions & 2 rubygems