static synchronized void reportBlackboardPostCount(long ingestJobId) { Long refCount = refCounter.decrementAndGet(ingestJobId); if (refCount == 0) { Long filesCount = artifactCountsForIngestJobs.remove(ingestJobId); String msgText = String.format("Posted %d times to the blackboard", filesCount); IngestMessage message = IngestMessage.createMessage( IngestMessage.MessageType.INFO, SampleIngestModuleFactory.getModuleName(), msgText); IngestServices.getInstance().postMessage(message); } }
/** @inheritDoc */ @Override public void shutDown() { if (context != null) { if (refCounter.decrementAndGet(this.context.getJobId()) == 0) { // Shutting down the last instance of this module for this ingest // job, so discard the interesting file sets definitions snapshot // for the job. FilesIdentifierIngestModule.interestingFileSetsByJob.remove(this.context.getJobId()); } } }