@java.lang.Override public int hashCode() { int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasTotal()) { hash = (37 * hash) + TOTAL_FIELD_NUMBER; hash = (53 * hash) + getTotal(); } if (hasWhole()) { hash = (37 * hash) + WHOLE_FIELD_NUMBER; hash = (53 * hash) + getWhole(); } if (hasOfsDelta()) { hash = (37 * hash) + OFS_DELTA_FIELD_NUMBER; hash = (53 * hash) + getOfsDelta(); } if (hasRefDelta()) { hash = (37 * hash) + REF_DELTA_FIELD_NUMBER; hash = (53 * hash) + getRefDelta(); } hash = (29 * hash) + getUnknownFields().hashCode(); return hash; }
@java.lang.Override public int hashCode() { int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasTotal()) { hash = (37 * hash) + TOTAL_FIELD_NUMBER; hash = (53 * hash) + getTotal(); } if (hasWhole()) { hash = (37 * hash) + WHOLE_FIELD_NUMBER; hash = (53 * hash) + getWhole(); } if (hasOfsDelta()) { hash = (37 * hash) + OFS_DELTA_FIELD_NUMBER; hash = (53 * hash) + getOfsDelta(); } if (hasRefDelta()) { hash = (37 * hash) + REF_DELTA_FIELD_NUMBER; hash = (53 * hash) + getRefDelta(); } hash = (29 * hash) + getUnknownFields().hashCode(); return hash; }
private void addChunkList(CachedPackInfo.Builder info, MessageDigest version, List<ChunkKey> list) { if (list == null) return; long bytesTotal = info.getBytesTotal(); long objectsTotal = info.getObjectsTotal(); long objectsDelta = info.getObjectsDelta(); byte[] buf = new byte[Constants.OBJECT_ID_LENGTH]; for (ChunkKey key : list) { ChunkInfo chunkInfo = infoByKey.get(key); GitStore.ChunkInfo c = chunkInfo.getData(); int len = c.getChunkSize() - ChunkFormatter.TRAILER_SIZE; bytesTotal += len; objectsTotal += c.getObjectCounts().getTotal(); objectsDelta += c.getObjectCounts().getOfsDelta(); objectsDelta += c.getObjectCounts().getRefDelta(); info.getChunkListBuilder().addChunkKey( chunkInfo.getChunkKey().asString()); chunkInfo.getChunkKey().getChunkHash().copyRawTo(buf, 0); version.update(buf); } info.setBytesTotal(bytesTotal); info.setObjectsTotal(objectsTotal); info.setObjectsDelta(objectsDelta); }
private void addChunkList(CachedPackInfo.Builder info, MessageDigest version, List<ChunkKey> list) { if (list == null) return; long bytesTotal = info.getBytesTotal(); long objectsTotal = info.getObjectsTotal(); long objectsDelta = info.getObjectsDelta(); byte[] buf = new byte[Constants.OBJECT_ID_LENGTH]; for (ChunkKey key : list) { ChunkInfo chunkInfo = infoByKey.get(key); GitStore.ChunkInfo c = chunkInfo.getData(); int len = c.getChunkSize() - ChunkFormatter.TRAILER_SIZE; bytesTotal += len; objectsTotal += c.getObjectCounts().getTotal(); objectsDelta += c.getObjectCounts().getOfsDelta(); objectsDelta += c.getObjectCounts().getRefDelta(); info.getChunkListBuilder().addChunkKey( chunkInfo.getChunkKey().asString()); chunkInfo.getChunkKey().getChunkHash().copyRawTo(buf, 0); version.update(buf); } info.setBytesTotal(bytesTotal); info.setObjectsTotal(objectsTotal); info.setObjectsDelta(objectsDelta); }
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.getDefaultInstance()) return this; if (other.hasTotal()) { setTotal(other.getTotal()); } if (other.hasWhole()) { setWhole(other.getWhole()); } if (other.hasOfsDelta()) { setOfsDelta(other.getOfsDelta()); } if (other.hasRefDelta()) { setRefDelta(other.getRefDelta()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.getDefaultInstance()) return this; if (other.hasTotal()) { setTotal(other.getTotal()); } if (other.hasWhole()) { setWhole(other.getWhole()); } if (other.hasOfsDelta()) { setOfsDelta(other.getOfsDelta()); } if (other.hasRefDelta()) { setRefDelta(other.getRefDelta()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }