public Builder clear() { super.clear(); source_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.Source.RECEIVE; bitField0_ = (bitField0_ & ~0x00000001); objectType_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectType.MIXED; bitField0_ = (bitField0_ & ~0x00000002); isFragment_ = false; bitField0_ = (bitField0_ & ~0x00000004); cachedPackKey_ = ""; bitField0_ = (bitField0_ & ~0x00000008); if (objectCountsBuilder_ == null) { objectCounts_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.getDefaultInstance(); } else { objectCountsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); chunkSize_ = 0; bitField0_ = (bitField0_ & ~0x00000020); indexSize_ = 0; bitField0_ = (bitField0_ & ~0x00000040); metaSize_ = 0; bitField0_ = (bitField0_ & ~0x00000080); return this; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, total_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, whole_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt32(3, ofsDelta_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt32(4, refDelta_); } getUnknownFields().writeTo(output); }
if (hasObjectCounts()) { result = result && getObjectCounts() .equals(other.getObjectCounts());
if (hasObjectCounts()) { result = result && getObjectCounts() .equals(other.getObjectCounts());
result = result && (hasTotal() == other.hasTotal()); if (hasTotal()) { result = result && (getTotal() == other.getTotal()); result = result && (hasWhole() == other.hasWhole()); if (hasWhole()) { result = result && (getWhole() == other.getWhole()); result = result && (hasOfsDelta() == other.hasOfsDelta()); if (hasOfsDelta()) { result = result && (getOfsDelta() == other.getOfsDelta()); result = result && (hasRefDelta() == other.hasRefDelta()); if (hasRefDelta()) { result = result && (getRefDelta() == other.getRefDelta()); getUnknownFields().equals(other.getUnknownFields()); return result;
result = result && (hasTotal() == other.hasTotal()); if (hasTotal()) { result = result && (getTotal() == other.getTotal()); result = result && (hasWhole() == other.hasWhole()); if (hasWhole()) { result = result && (getWhole() == other.getWhole()); result = result && (hasOfsDelta() == other.hasOfsDelta()); if (hasOfsDelta()) { result = result && (getOfsDelta() == other.getOfsDelta()); result = result && (hasRefDelta() == other.hasRefDelta()); if (hasRefDelta()) { result = result && (getRefDelta() == other.getRefDelta()); getUnknownFields().equals(other.getUnknownFields()); return result;
public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, total_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, whole_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, ofsDelta_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, refDelta_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
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 int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, total_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, whole_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, ofsDelta_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, refDelta_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; }
public Builder clear() { super.clear(); source_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.Source.RECEIVE; bitField0_ = (bitField0_ & ~0x00000001); objectType_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectType.MIXED; bitField0_ = (bitField0_ & ~0x00000002); isFragment_ = false; bitField0_ = (bitField0_ & ~0x00000004); cachedPackKey_ = ""; bitField0_ = (bitField0_ & ~0x00000008); if (objectCountsBuilder_ == null) { objectCounts_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.getDefaultInstance(); } else { objectCountsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); chunkSize_ = 0; bitField0_ = (bitField0_ & ~0x00000020); indexSize_ = 0; bitField0_ = (bitField0_ & ~0x00000040); metaSize_ = 0; bitField0_ = (bitField0_ & ~0x00000080); return this; }
public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts buildPartial() { org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts result = new org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.total_ = total_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.whole_ = whole_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.ofsDelta_ = ofsDelta_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.refDelta_ = refDelta_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts buildPartial() { org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts result = new org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.total_ = total_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.whole_ = whole_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.ofsDelta_ = ofsDelta_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.refDelta_ = refDelta_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@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; }
public Builder mergeObjectCounts(org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts value) { if (objectCountsBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && objectCounts_ != org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.getDefaultInstance()) { objectCounts_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.newBuilder(objectCounts_).mergeFrom(value).buildPartial(); } else { objectCounts_ = value; } onChanged(); } else { objectCountsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } public Builder clearObjectCounts() {
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, total_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(2, whole_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt32(3, ofsDelta_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt32(4, refDelta_); } getUnknownFields().writeTo(output); }
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 mergeObjectCounts(org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts value) { if (objectCountsBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && objectCounts_ != org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.getDefaultInstance()) { objectCounts_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.newBuilder(objectCounts_).mergeFrom(value).buildPartial(); } else { objectCounts_ = value; } onChanged(); } else { objectCountsBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } public Builder clearObjectCounts() {
public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts getDefaultInstanceForType() { return org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkInfo.ObjectCounts.getDefaultInstance(); }