public Builder setChunkList( org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.Builder builderForValue) { if (chunkListBuilder_ == null) { chunkList_ = builderForValue.build(); onChanged(); } else { chunkListBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; return this; } public Builder mergeChunkList(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList value) {
org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.Builder subBuilder = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.newBuilder(); if (hasChunkList()) { subBuilder.mergeFrom(getChunkList()); setChunkList(subBuilder.buildPartial()); break;
com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; ensureChunkKeyIsMutable(); chunkKey_.add(input.readBytes()); break;
org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.Builder subBuilder = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.newBuilder(); if (hasChunkList()) { subBuilder.mergeFrom(getChunkList()); setChunkList(subBuilder.buildPartial()); break;
com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; ensureChunkKeyIsMutable(); chunkKey_.add(input.readBytes()); break;
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 mergeChunkList(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList value) { if (chunkListBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040) && chunkList_ != org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance()) { chunkList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.newBuilder(chunkList_).mergeFrom(value).buildPartial(); } else { chunkList_ = value; } onChanged(); } else { chunkListBuilder_.mergeFrom(value); } bitField0_ |= 0x00000040; return this; } public Builder clearChunkList() {
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance()) return this; if (!other.chunkKey_.isEmpty()) { if (chunkKey_.isEmpty()) { chunkKey_ = other.chunkKey_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureChunkKeyIsMutable(); chunkKey_.addAll(other.chunkKey_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeChunkList(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList value) { if (chunkListBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040) && chunkList_ != org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance()) { chunkList_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.newBuilder(chunkList_).mergeFrom(value).buildPartial(); } else { chunkList_ = value; } onChanged(); } else { chunkListBuilder_.mergeFrom(value); } bitField0_ |= 0x00000040; return this; } public Builder clearChunkList() {
private static Builder create() { return new Builder(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
public static Builder newBuilder(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public static Builder newBuilder(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.ChunkList.getDefaultInstance()) return this; if (!other.chunkKey_.isEmpty()) { if (chunkKey_.isEmpty()) { chunkKey_ = other.chunkKey_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureChunkKeyIsMutable(); chunkKey_.addAll(other.chunkKey_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
private Builder() { maybeForceBuilderInitialization(); }
private static Builder create() { return new Builder(); }
private Builder() { maybeForceBuilderInitialization(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
public Builder addChunkKey(String value) { if (value == null) { throw new NullPointerException(); } ensureChunkKeyIsMutable(); chunkKey_.add(value); onChanged(); return this; } public Builder addAllChunkKey(