@Test public void testGetFirstLogLineBeginning() { TargetInstance mockTargetInstance = mock(TargetInstance.class); String fileName = "testFile"; String match = "match"; testInstance.getFirstLogLineBeginning(mockTargetInstance, fileName, match); verify(mockHarvestLogManager).getFirstLogLineBeginning(mockTargetInstance, fileName, match); }
public Integer getFirstLogLineBeginning(TargetInstance aTargetInstance, String aFileName, String match) { return harvestLogManager.getFirstLogLineBeginning(aTargetInstance, aFileName, match); }
HarvestCoordinatorImpl implements HarvestCoordinator { public Integer getFirstLogLineBeginning(TargetInstance aTargetInstance, String aFileName, String match) { return harvestLogManager.getFirstLogLineBeginning(aTargetInstance, aFileName, match); } }
HarvestCoordinatorImpl implements HarvestCoordinator { public Integer getFirstLogLineBeginning(TargetInstance aTargetInstance, String aFileName, String match) { return harvestLogManager.getFirstLogLineBeginning(aTargetInstance, aFileName, match); } HarvestCoordinatorImpl(); }
HarvestCoordinatorImpl implements HarvestCoordinator { public Integer getFirstLogLineBeginning(TargetInstance aTargetInstance, String aFileName, String match) { return harvestLogManager.getFirstLogLineBeginning(aTargetInstance, aFileName, match); } HarvestCoordinatorImpl(); void heartbeat(HarvestAgentStatusDTO aStatus); void requestRecovery(String haHost, int port, String haService); void recoverHarvests(String haHost, int haPort, String haService); void harvestComplete(HarvestResultDTO aResult); Boolean reIndexHarvestResult(HarvestResult origHarvestResult); void notification(Long aTargetInstanceOid, int notificationCategory, String aMessageType); void notification(String aSubject, int notificationCategory, String aMessage); void harvest(TargetInstance aTargetInstance, HarvestAgentStatusDTO aHarvestAgent); synchronized void checkForBandwidthTransition(); long getCurrentGlobalMaxBandwidth(); HashMap<String, List<BandwidthRestriction>> getBandwidthRestrictions(); BandwidthRestriction getBandwidthRestriction(Long aOid); BandwidthRestriction getBandwidthRestriction(String aDay, Date aTime); void saveOrUpdate(BandwidthRestriction bandwidthRestriction); void delete(BandwidthRestriction bandwidthRestriction); void setMinimumBandwidth(int aMinimumBandwidth); void setTargetInstanceDao(TargetInstanceDAO targetInstanceDao); int getMaxBandwidthPercent(); void setMaxBandwidthPercent(int maxBandwidthPercent); void updateProfileOverrides(TargetInstance aTargetInstance); void pause(TargetInstance aTargetInstance); void resume(TargetInstance aTargetInstance); void abort(TargetInstance aTargetInstance); void stop(TargetInstance aTargetInstance); void pauseAll(); void resumeAll(); void pauseQueue(); void resumeQueue(); boolean isQueuePaused(); void processSchedule(); synchronized void harvestOrQueue(QueuedTargetInstanceDTO aTargetInstance); boolean isMiniumBandwidthAvailable(TargetInstance aTargetInstance); List<String> listLogFiles(TargetInstance aTargetInstance); LogFilePropertiesDTO[] listLogFileAttributes(TargetInstance aTargetInstance); String[] tailLog(TargetInstance aTargetInstance, String aFileName, int aNoOfLines); Integer countLogLines(TargetInstance aTargetInstance, String aFileName); String[] headLog(TargetInstance aTargetInstance, String aFileName, int aNoOfLines); String[] getLog(TargetInstance aTargetInstance, String aFileName, int aStartLine, int aNoOfLines); Integer getFirstLogLineBeginning(TargetInstance aTargetInstance, String aFileName, String match); Integer getFirstLogLineContaining(TargetInstance aTargetInstance, String aFileName, String match); Integer getFirstLogLineAfterTimeStamp(TargetInstance aTargetInstance, String aFileName, Long timestamp); String[] getLogLinesByRegex(TargetInstance aTargetInstance, String aFileName, int aNoOfLines, String aRegex,
			boolean prependLineNumbers); String[] getHopPath(TargetInstance aTargetInstance, String aFileName, String aUrl); File getLogfile(TargetInstance aTargetInstance, String aFilename); void purgeDigitalAssets(); void purgeAbortedTargetInstances(); void setDigitalAssetStoreFactory(DigitalAssetStoreFactory digitalAssetStoreFactory); void setTargetManager(TargetManager targetManager); void setInTrayManager(InTrayManager inTrayManager); void setDaysBeforeDASPurge(int daysBeforeDASPurge); void setDaysBeforeAbortedTargetInstancePurge(int daysBeforeAbortedTargetInstancePurge); void setSipBuilder(SipBuilder sipBuilder); void addToHarvestResult(Long harvestResultOid, ArcHarvestFileDTO ahf); void addHarvestResources(Long harvestResultOid, Collection<HarvestResourceDTO> dtos); Long createHarvestResult(HarvestResultDTO harvestResultDTO); void finaliseIndex(Long harvestResultOid); void runQaRecommentationService(TargetInstance ti); void notifyAQAComplete(String aqaId); void removeIndexes(TargetInstance ti); void removeIndexes(HarvestResult hr); void completeArchiving(Long targetInstanceOid, String archiveIID); void failedArchiving(Long targetInstanceOid, String message); void setTargetInstanceManager(TargetInstanceManager targetInstanceManager); @Override void pauseAgent(String agentName); @Override void resumeAgent(String agentName); @Override int getHarvestOptimizationLookAheadHours(); void setHarvestOptimizationLookAheadHours(int harvestOptimizeLookAheadHours); @Override void setHarvestOptimizationEnabled(boolean state); @Override boolean isHarvestOptimizationEnabled(); int getNumHarvestersExcludedFromOptimisation(); void setNumHarvestersExcludedFromOptimisation(int numHarvestersExcludedFromOptimisation); @Override HashMap<String, HarvestAgentStatusDTO> getHarvestAgents(); void setHarvestAgentManager(HarvestAgentManager harvestAgentManager); void setHarvestLogManager(HarvestLogManager harvestLogManager); void setHarvestBandwidthManager(HarvestBandwidthManager harvestBandwidthManager); void setHarvestQaManager(HarvestQaManager harvestQaManager); }
HarvestCoordinatorImpl implements HarvestCoordinator { public Integer getFirstLogLineBeginning(TargetInstance aTargetInstance, String aFileName, String match) { return harvestLogManager.getFirstLogLineBeginning(aTargetInstance, aFileName, match); } HarvestCoordinatorImpl(); void heartbeat(HarvestAgentStatusDTO aStatus); void requestRecovery(String haHost, int port, String haService); void recoverHarvests(String haHost, int haPort, String haService); void harvestComplete(HarvestResultDTO aResult); Boolean reIndexHarvestResult(HarvestResult origHarvestResult); void notification(Long aTargetInstanceOid, int notificationCategory, String aMessageType); void notification(String aSubject, int notificationCategory, String aMessage); void harvest(TargetInstance aTargetInstance, HarvestAgentStatusDTO aHarvestAgent); synchronized void checkForBandwidthTransition(); long getCurrentGlobalMaxBandwidth(); HashMap<String, List<BandwidthRestriction>> getBandwidthRestrictions(); BandwidthRestriction getBandwidthRestriction(Long aOid); BandwidthRestriction getBandwidthRestriction(String aDay, Date aTime); void saveOrUpdate(BandwidthRestriction bandwidthRestriction); void delete(BandwidthRestriction bandwidthRestriction); void setMinimumBandwidth(int aMinimumBandwidth); void setTargetInstanceDao(TargetInstanceDAO targetInstanceDao); int getMaxBandwidthPercent(); void setMaxBandwidthPercent(int maxBandwidthPercent); void updateProfileOverrides(TargetInstance aTargetInstance); void pause(TargetInstance aTargetInstance); void resume(TargetInstance aTargetInstance); void abort(TargetInstance aTargetInstance); void stop(TargetInstance aTargetInstance); void pauseAll(); void resumeAll(); void pauseQueue(); void resumeQueue(); boolean isQueuePaused(); void processSchedule(); synchronized void harvestOrQueue(QueuedTargetInstanceDTO aTargetInstance); boolean isMiniumBandwidthAvailable(TargetInstance aTargetInstance); List<String> listLogFiles(TargetInstance aTargetInstance); LogFilePropertiesDTO[] listLogFileAttributes(TargetInstance aTargetInstance); String[] tailLog(TargetInstance aTargetInstance, String aFileName, int aNoOfLines); Integer countLogLines(TargetInstance aTargetInstance, String aFileName); String[] headLog(TargetInstance aTargetInstance, String aFileName, int aNoOfLines); String[] getLog(TargetInstance aTargetInstance, String aFileName, int aStartLine, int aNoOfLines); Integer getFirstLogLineBeginning(TargetInstance aTargetInstance, String aFileName, String match); Integer getFirstLogLineContaining(TargetInstance aTargetInstance, String aFileName, String match); Integer getFirstLogLineAfterTimeStamp(TargetInstance aTargetInstance, String aFileName, Long timestamp); String[] getLogLinesByRegex(TargetInstance aTargetInstance, String aFileName, int aNoOfLines, String aRegex,
			boolean prependLineNumbers); String[] getHopPath(TargetInstance aTargetInstance, String aFileName, String aUrl); File getLogfile(TargetInstance aTargetInstance, String aFilename); void purgeDigitalAssets(); void purgeAbortedTargetInstances(); void setDigitalAssetStoreFactory(DigitalAssetStoreFactory digitalAssetStoreFactory); void setTargetManager(TargetManager targetManager); void setInTrayManager(InTrayManager inTrayManager); void setDaysBeforeDASPurge(int daysBeforeDASPurge); void setDaysBeforeAbortedTargetInstancePurge(int daysBeforeAbortedTargetInstancePurge); void setSipBuilder(SipBuilder sipBuilder); void addToHarvestResult(Long harvestResultOid, ArcHarvestFileDTO ahf); void addHarvestResources(Long harvestResultOid, Collection<HarvestResourceDTO> dtos); Long createHarvestResult(HarvestResultDTO harvestResultDTO); void finaliseIndex(Long harvestResultOid); void runQaRecommentationService(TargetInstance ti); void notifyAQAComplete(String aqaId); void removeIndexes(TargetInstance ti); void removeIndexes(HarvestResult hr); void completeArchiving(Long targetInstanceOid, String archiveIID); void failedArchiving(Long targetInstanceOid, String message); void setTargetInstanceManager(TargetInstanceManager targetInstanceManager); @Override void pauseAgent(String agentName); @Override void resumeAgent(String agentName); @Override int getHarvestOptimizationLookAheadHours(); void setHarvestOptimizationLookAheadHours(int harvestOptimizeLookAheadHours); @Override void setHarvestOptimizationEnabled(boolean state); @Override boolean isHarvestOptimizationEnabled(); int getNumHarvestersExcludedFromOptimisation(); void setNumHarvestersExcludedFromOptimisation(int numHarvestersExcludedFromOptimisation); @Override HashMap<String, HarvestAgentStatusDTO> getHarvestAgents(); void setHarvestAgentManager(HarvestAgentManager harvestAgentManager); void setHarvestLogManager(HarvestLogManager harvestLogManager); void setHarvestBandwidthManager(HarvestBandwidthManager harvestBandwidthManager); void setHarvestQaManager(HarvestQaManager harvestQaManager);  }