/** * Return an instance of the QueryTracker * * @param con connection to the database * @param trackQueue the queue where the tracks are temporary stored * @return QueryTracker the query tracker */ public static QueryTracker getInstance(Connection con, Queue<Track> trackQueue) { if (queryTracker == null) { queryTracker = new QueryTracker(con, trackQueue); try { queryTracker.createTrackerTable(con); } catch (Exception e) { LOG.error("Error creating the table associated to the QueryTracker" + e); } } return queryTracker; }