private QueueExecutionInfo getSyncerInfo(long qid, long syncerId) { QueueExecutionInfo res = m_syncers.get(qid); if (null == res) { IQSyncer syncer = m_syncerExternals.getQSyncer(qid, syncerId); syncer.connectToQueue(qid); res = new QueueExecutionInfo(syncer); m_syncers.put(qid, res); } return res; }
public void run() { QSyncTaskResult result; try { m_syncer.init(); boolean bCompleted = exec(); result = new QSyncTaskResult( m_qid, m_syncerId, bCompleted ? QSyncTaskStatus.SYNCED : QSyncTaskStatus.EXEC_TIMEOUT, null); } catch (Exception e) { ApiAlgs.getLog(this).error("Sync task error", e); m_syncer.finit(e); result = new QSyncTaskResult(m_qid, m_syncerId, m_errorStatus, e); } m_syncMan.onTaskCompleted(result); SrvApiAlgs2.getIServerTran().commit(); }
public synchronized void registerQueue(long qid, long syncerId) { queueBL().registerQueue(qid, syncerId, QSyncTaskStatus.INITIAL_SYNC); IQSyncer syncer = m_syncerExternals.getQSyncer(qid, syncerId); syncer.connectToQueue(qid); m_syncers.put(qid, new QueueExecutionInfo(syncer)); }