size += 1 * getBlockIdsList().size();
if (getBlockIdsCount() > 0) { hash = (37 * hash) + BLOCK_IDS_FIELD_NUMBER; hash = (53 * hash) + getBlockIdsList().hashCode();
result = result && getBlockIdsList() .equals(other.getBlockIdsList()); result = result && (hasId() == other.hasId()); if (hasId()) {
size += 1 * getBlockIdsList().size();
/** * @param entry the entry to use * @throws InvalidPathException if an invalid path is encountered * @throws InvalidFileSizeException if an invalid file size is encountered * @throws FileAlreadyCompletedException if the file has already been completed */ private void completeFileFromEntry(CompleteFileEntry entry) throws InvalidPathException, InvalidFileSizeException, FileAlreadyCompletedException, UnavailableException { try (LockedInodePath inodePath = mInodeTree .lockFullInodePath(entry.getId(), InodeTree.LockMode.WRITE)) { completeFileInternal(entry.getBlockIdsList(), inodePath, entry.getLength(), entry.getOpTimeMs(), entry.getUfsFingerprint(), true); } catch (FileDoesNotExistException e) { throw new RuntimeException(e); } }
private void apply(CompleteFileEntry entry) { apply(UpdateInodeEntry.newBuilder() .setId(entry.getId()) .setLastModificationTimeMs(entry.getOpTimeMs()) .setOverwriteModificationTime(true) .setUfsFingerprint(entry.getUfsFingerprint()) .build()); apply(UpdateInodeFileEntry.newBuilder() .setId(entry.getId()) .setLength(entry.getLength()) .addAllSetBlocks(entry.getBlockIdsList()) .build()); }