@Override protected void consume(List<StorageOperation> item) throws Exception { if (item!=null && item.size()>0) { log.debug("Updating tags with " + item.size() + " operations..."); long start = System.currentTimeMillis(); storageFacade.batch(item, IStorage.EXECUTION_MODE.TRANSACTIONAL); log.debug("Updating tags took " + (System.currentTimeMillis() - start) + " ms"); } else { log.debug("got no storage operations to process!"); } }
@Override protected Chunk doProcessChunk(final Chunk data, final Map<String, Serializable> context, final IProcessListener processListener, final ProcessingStats stats) throws Exception { storageFacade.batch(data.getCustomStorageOperations(), IStorage.EXECUTION_MODE.TRANSACTIONAL); return data; }