@Test public void writeTaskExceptionDuringWrite() throws IOException { TimerData timerData = new TimerData(); WriteTask writeTask = storageWriter.new WriteTask(timerData, Collections.emptyMap()); doThrow(IOException.class).when(writingChannelManager).write(Matchers.<ExtendedByteBufferOutputStream> anyObject(), Matchers.<Path> anyObject(), Matchers.<WriteReadCompletionRunnable> anyObject()); writeTask.run(); verify(storageIndexingTreeHandler, times(1)).writeFailed(writeTask); verify(extendedByteBufferOutputStream, times(1)).close(); verify(serializerQueue, times(1)).add(serializer); }
@Override public Future<Void> write(DefaultData defaultData) { return write(defaultData, Collections.emptyMap()); }
StorageWriter implements IWriter { @Override public Future<Void> write(DefaultData defaultData) { return write(defaultData, Collections.emptyMap()); } }
StorageWriter implements IWriter { @Override public Future<Void> write(DefaultData defaultData) { return write(defaultData, Collections.emptyMap()); }  }
StorageWriter implements IWriter { @Override public Future<Void> write(DefaultData defaultData) { return write(defaultData, Collections.emptyMap()); }  Collection<Future<Void>> process(Collection<? extends DefaultData> defaultDataList, Collection<AbstractDataProcessor> processors); void processSynchronously(Collection<? extends DefaultData> defaultDataList, Collection<AbstractDataProcessor> processors); @Override Future<Void> write(DefaultData defaultData); @Override Future<Void> write(DefaultData defaultData, Map<?, ?> kryoPreferences); synchronized boolean prepareForWrite(StorageData storageData); final synchronized void cancel(); final synchronized void closeStorageWriter(); long getQueuedTaskCount(); boolean writeNonDefaultDataObject(Object object, String fileName); Path getWritingFolderPath(); String getExecutorServiceStatus(); boolean isWritingOn(); StorageData getStorageData(); WritingStatus getWritingStatus(); @PostConstruct void postConstruct(); @Override String toString(); }
StorageWriter implements IWriter { @Override public Future<Void> write(DefaultData defaultData) { return write(defaultData, Collections.emptyMap()); }  Collection<Future<Void>> process(Collection<? extends DefaultData> defaultDataList, Collection<AbstractDataProcessor> processors); void processSynchronously(Collection<? extends DefaultData> defaultDataList, Collection<AbstractDataProcessor> processors); @Override Future<Void> write(DefaultData defaultData); @Override Future<Void> write(DefaultData defaultData, Map<?, ?> kryoPreferences); synchronized boolean prepareForWrite(StorageData storageData); final synchronized void cancel(); final synchronized void closeStorageWriter(); long getQueuedTaskCount(); boolean writeNonDefaultDataObject(Object object, String fileName); Path getWritingFolderPath(); String getExecutorServiceStatus(); boolean isWritingOn(); StorageData getStorageData(); WritingStatus getWritingStatus(); @PostConstruct void postConstruct(); @Override String toString();  }