Exemplo n.º 1
0
    ManagerImp (
        Stoppable& parent,
        beast::File const& pathToDbFileOrDirectory,
        beast::Journal journal)
        : Stoppable ("Validators::Manager", parent)
        , Thread ("Validators")
        , m_journal (journal)
        , m_databaseFile (pathToDbFileOrDirectory)
        , m_store (m_journal)
        , m_logic (m_store, m_journal)
        , m_checkTimer (this)
        , m_checkSources (false)
    {
        m_journal.trace <<
            "Validators constructed";
        m_journal.debug <<
            "Validators constructed (debug)";
        m_journal.info <<
            "Validators constructed (info)";

        if (m_databaseFile.isDirectory ())
            m_databaseFile = m_databaseFile.getChildFile("validators.sqlite");


    }
Exemplo n.º 2
0
 ManagerImp (
     Stoppable& stoppable,
     boost::asio::io_service& io_service,
     beast::File const& pathToDbFileOrDirectory,
     clock_type& clock,
     beast::Journal journal)
     : Manager (stoppable)
     , io_service_(io_service)
     , work_(boost::in_place(std::ref(io_service_)))
     , m_databaseFile (pathToDbFileOrDirectory)
     , m_clock (clock)
     , m_journal (journal)
     , m_store (journal)
     , checker_ (io_service_)
     , m_logic (clock, m_store, checker_, journal)
 {
     if (m_databaseFile.isDirectory ())
         m_databaseFile = m_databaseFile.getChildFile("peerfinder.sqlite");
 }