fileMap = new GridGgfsFileMap();
fileMap = new GridGgfsFileMap();
/** {@inheritDoc} */ @Override public GridGgfsFileInfo apply(GridGgfsFileInfo oldInfo) { GridGgfsFileMap oldMap = oldInfo.fileMap(); GridGgfsFileMap newMap = new GridGgfsFileMap(oldMap); newMap.addRange(range); // Update file length. GridGgfsFileInfo updated = new GridGgfsFileInfo(oldInfo, oldInfo.length() + space); updated.fileMap(newMap); return updated; }
/** {@inheritDoc} */ @Override public GridGgfsFileInfo apply(GridGgfsFileInfo oldInfo) { GridGgfsFileMap oldMap = oldInfo.fileMap(); GridGgfsFileMap newMap = new GridGgfsFileMap(oldMap); newMap.addRange(range); // Update file length. GridGgfsFileInfo updated = new GridGgfsFileInfo(oldInfo, oldInfo.length() + space); updated.fileMap(newMap); return updated; }
@Override public GridGgfsFileInfo applyx(GridGgfsFileInfo info) throws GridException { GridGgfsFileMap map = new GridGgfsFileMap(info.fileMap()); map.deleteRange(range); if (log.isDebugEnabled()) log.debug("Deleted range from file map [fileId=" + info.id() + ", range=" + range + ", oldMap=" + info.fileMap() + ", newMap=" + map + ']'); GridGgfsFileInfo updated = new GridGgfsFileInfo(info, info.length()); updated.fileMap(map); return updated; } };
@Override public GridGgfsFileInfo applyx(GridGgfsFileInfo info) throws GridException { GridGgfsFileMap map = new GridGgfsFileMap(info.fileMap()); map.updateRangeStatus(range, status); if (log.isDebugEnabled()) log.debug("Updated file map for range [fileId=" + info.id() + ", range=" + range + ", status=" + status + ", oldMap=" + info.fileMap() + ", newMap=" + map + ']'); GridGgfsFileInfo updated = new GridGgfsFileInfo(info, info.length()); updated.fileMap(map); return updated; } };
@Override public GridGgfsFileInfo applyx(GridGgfsFileInfo info) throws GridException { GridGgfsFileMap map = new GridGgfsFileMap(info.fileMap()); map.updateRangeStatus(range, status); if (log.isDebugEnabled()) log.debug("Updated file map for range [fileId=" + info.id() + ", range=" + range + ", status=" + status + ", oldMap=" + info.fileMap() + ", newMap=" + map + ']'); GridGgfsFileInfo updated = new GridGgfsFileInfo(info, info.length()); updated.fileMap(map); return updated; } };
@Override public GridGgfsFileInfo applyx(GridGgfsFileInfo info) throws GridException { GridGgfsFileMap map = new GridGgfsFileMap(info.fileMap()); map.deleteRange(range); if (log.isDebugEnabled()) log.debug("Deleted range from file map [fileId=" + info.id() + ", range=" + range + ", oldMap=" + info.fileMap() + ", newMap=" + map + ']'); GridGgfsFileInfo updated = new GridGgfsFileInfo(info, info.length()); updated.fileMap(map); return updated; } };