public Builder addPack( int index, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder builderForValue) { if (packBuilder_ == null) { ensurePackIsMutable(); pack_.add(index, builderForValue.build()); onChanged(); } else { packBuilder_.addMessage(index, builderForValue.build()); } return this; } public Builder addAllPack(
org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder subBuilder = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.newBuilder(); input.readMessage(subBuilder, extensionRegistry); addPack(subBuilder.buildPartial()); break;
info.getTipListBuilder().addObjectName(obj.name()); addChunkList(info, version, chunkByOrder[OBJ_BLOB]); info.setName(computePackName().name()); info.setVersion(ObjectId.fromRaw(version.digest()).name()); cachedPackKey = CachedPackKey.fromInfo(info.build()); for (List<ChunkKey> list : chunkByOrder) { if (list == null) db.repository().put(repo, info.build(), dbWriteBuffer);
info.getTipListBuilder().addObjectName(obj.name()); addChunkList(info, version, chunkByOrder[OBJ_BLOB]); info.setName(computePackName().name()); info.setVersion(ObjectId.fromRaw(version.digest()).name()); cachedPackKey = CachedPackKey.fromInfo(info.build()); for (List<ChunkKey> list : chunkByOrder) { if (list == null) db.repository().put(repo, info.build(), dbWriteBuffer);
org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder subBuilder = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.newBuilder(); input.readMessage(subBuilder, extensionRegistry); addPack(subBuilder.buildPartial()); 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 mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.getDefaultInstance()) return this; if (other.hasName()) { setName(other.getName()); } if (other.hasVersion()) { setVersion(other.getVersion()); } if (other.hasObjectsTotal()) { setObjectsTotal(other.getObjectsTotal()); } if (other.hasObjectsDelta()) { setObjectsDelta(other.getObjectsDelta()); } if (other.hasBytesTotal()) { setBytesTotal(other.getBytesTotal()); } if (other.hasTipList()) { mergeTipList(other.getTipList()); } if (other.hasChunkList()) { mergeChunkList(other.getChunkList()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo other) { if (other == org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.getDefaultInstance()) return this; if (other.hasName()) { setName(other.getName()); } if (other.hasVersion()) { setVersion(other.getVersion()); } if (other.hasObjectsTotal()) { setObjectsTotal(other.getObjectsTotal()); } if (other.hasObjectsDelta()) { setObjectsDelta(other.getObjectsDelta()); } if (other.hasBytesTotal()) { setBytesTotal(other.getBytesTotal()); } if (other.hasTipList()) { mergeTipList(other.getTipList()); } if (other.hasChunkList()) { mergeChunkList(other.getChunkList()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
private static Builder create() { return new Builder(); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
public Builder clone() { return create().mergeFrom(buildPartial()); }
private static Builder create() { return new Builder(); }
@java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends
public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo build() { org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
private org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; }
public Builder addPack( int index, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder builderForValue) { if (packBuilder_ == null) { ensurePackIsMutable(); pack_.add(index, builderForValue.build()); onChanged(); } else { packBuilder_.addMessage(index, builderForValue.build()); } return this; } public Builder addAllPack(
public Builder addPack( org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder builderForValue) { if (packBuilder_ == null) { ensurePackIsMutable(); pack_.add(builderForValue.build()); onChanged(); } else { packBuilder_.addMessage(builderForValue.build()); } return this; } public Builder addPack(
private org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; }
public Builder addPack( org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder builderForValue) { if (packBuilder_ == null) { ensurePackIsMutable(); pack_.add(builderForValue.build()); onChanged(); } else { packBuilder_.addMessage(builderForValue.build()); } return this; } public Builder addPack(