private Set<MultiChunkEntry> determineRequiredMultiChunks( List<FileSystemAction> actions, Database winnersDatabase) { Set<MultiChunkEntry> multiChunksToDownload = new HashSet<MultiChunkEntry>(); for (FileSystemAction action : actions) { if (action instanceof FileCreatingFileSystemAction) { // TODO [low] This adds ALL multichunks even though some // might be available locally multiChunksToDownload.addAll( determineMultiChunksToDownload(action.getFile2(), localDatabase, winnersDatabase)); } } return multiChunksToDownload; }
private void applyFileSystemActions(List<FileSystemAction> actions) throws Exception { // Sort actions = sortFileSystemActions(actions); logger.log(Level.FINER, "- Applying file system actions (sorted!) ..."); // Apply for (FileSystemAction action : actions) { if (logger.isLoggable(Level.FINER)) { logger.log(Level.FINER, " + {0}", action); } try { action.execute(); } catch (InconsistentFileSystemException e) { logger.log( Level.FINER, " --> Inconsistent file system exception thrown. Ignoring for this file.", e); } } }