You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GitCache.java 100KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: org/eclipse/jgit/storage/dht/git_cache.proto
  3. package org.eclipse.jgit.generated.storage.dht.proto;
  4. public final class GitCache {
  5. private GitCache() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public interface CachedObjectIndexOrBuilder
  10. extends com.google.protobuf.MessageOrBuilder {
  11. // repeated .org.eclipse.jgit.storage.dht.CachedObjectIndex.Item item = 1;
  12. java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item>
  13. getItemList();
  14. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item getItem(int index);
  15. int getItemCount();
  16. java.util.List<? extends org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder>
  17. getItemOrBuilderList();
  18. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder getItemOrBuilder(
  19. int index);
  20. }
  21. public static final class CachedObjectIndex extends
  22. com.google.protobuf.GeneratedMessage
  23. implements CachedObjectIndexOrBuilder {
  24. // Use CachedObjectIndex.newBuilder() to construct.
  25. private CachedObjectIndex(Builder builder) {
  26. super(builder);
  27. }
  28. private CachedObjectIndex(boolean noInit) {}
  29. private static final CachedObjectIndex defaultInstance;
  30. public static CachedObjectIndex getDefaultInstance() {
  31. return defaultInstance;
  32. }
  33. public CachedObjectIndex getDefaultInstanceForType() {
  34. return defaultInstance;
  35. }
  36. public static final com.google.protobuf.Descriptors.Descriptor
  37. getDescriptor() {
  38. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_descriptor;
  39. }
  40. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  41. internalGetFieldAccessorTable() {
  42. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_fieldAccessorTable;
  43. }
  44. public interface ItemOrBuilder
  45. extends com.google.protobuf.MessageOrBuilder {
  46. // required string chunk_key = 1;
  47. boolean hasChunkKey();
  48. String getChunkKey();
  49. // required .org.eclipse.jgit.storage.dht.ObjectInfo object_info = 2;
  50. boolean hasObjectInfo();
  51. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo getObjectInfo();
  52. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfoOrBuilder getObjectInfoOrBuilder();
  53. // optional fixed64 time = 3;
  54. boolean hasTime();
  55. long getTime();
  56. }
  57. public static final class Item extends
  58. com.google.protobuf.GeneratedMessage
  59. implements ItemOrBuilder {
  60. // Use Item.newBuilder() to construct.
  61. private Item(Builder builder) {
  62. super(builder);
  63. }
  64. private Item(boolean noInit) {}
  65. private static final Item defaultInstance;
  66. public static Item getDefaultInstance() {
  67. return defaultInstance;
  68. }
  69. public Item getDefaultInstanceForType() {
  70. return defaultInstance;
  71. }
  72. public static final com.google.protobuf.Descriptors.Descriptor
  73. getDescriptor() {
  74. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_descriptor;
  75. }
  76. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  77. internalGetFieldAccessorTable() {
  78. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_fieldAccessorTable;
  79. }
  80. private int bitField0_;
  81. // required string chunk_key = 1;
  82. public static final int CHUNK_KEY_FIELD_NUMBER = 1;
  83. private Object chunkKey_;
  84. public boolean hasChunkKey() {
  85. return ((bitField0_ & 0x00000001) == 0x00000001);
  86. }
  87. public String getChunkKey() {
  88. Object ref = chunkKey_;
  89. if (ref instanceof String) {
  90. return (String) ref;
  91. } else {
  92. com.google.protobuf.ByteString bs =
  93. (com.google.protobuf.ByteString) ref;
  94. String s = bs.toStringUtf8();
  95. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  96. chunkKey_ = s;
  97. }
  98. return s;
  99. }
  100. }
  101. private com.google.protobuf.ByteString getChunkKeyBytes() {
  102. Object ref = chunkKey_;
  103. if (ref instanceof String) {
  104. com.google.protobuf.ByteString b =
  105. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  106. chunkKey_ = b;
  107. return b;
  108. } else {
  109. return (com.google.protobuf.ByteString) ref;
  110. }
  111. }
  112. // required .org.eclipse.jgit.storage.dht.ObjectInfo object_info = 2;
  113. public static final int OBJECT_INFO_FIELD_NUMBER = 2;
  114. private org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo objectInfo_;
  115. public boolean hasObjectInfo() {
  116. return ((bitField0_ & 0x00000002) == 0x00000002);
  117. }
  118. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo getObjectInfo() {
  119. return objectInfo_;
  120. }
  121. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfoOrBuilder getObjectInfoOrBuilder() {
  122. return objectInfo_;
  123. }
  124. // optional fixed64 time = 3;
  125. public static final int TIME_FIELD_NUMBER = 3;
  126. private long time_;
  127. public boolean hasTime() {
  128. return ((bitField0_ & 0x00000004) == 0x00000004);
  129. }
  130. public long getTime() {
  131. return time_;
  132. }
  133. private void initFields() {
  134. chunkKey_ = "";
  135. objectInfo_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.getDefaultInstance();
  136. time_ = 0L;
  137. }
  138. private byte memoizedIsInitialized = -1;
  139. public final boolean isInitialized() {
  140. byte isInitialized = memoizedIsInitialized;
  141. if (isInitialized != -1) return isInitialized == 1;
  142. if (!hasChunkKey()) {
  143. memoizedIsInitialized = 0;
  144. return false;
  145. }
  146. if (!hasObjectInfo()) {
  147. memoizedIsInitialized = 0;
  148. return false;
  149. }
  150. if (!getObjectInfo().isInitialized()) {
  151. memoizedIsInitialized = 0;
  152. return false;
  153. }
  154. memoizedIsInitialized = 1;
  155. return true;
  156. }
  157. public void writeTo(com.google.protobuf.CodedOutputStream output)
  158. throws java.io.IOException {
  159. getSerializedSize();
  160. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  161. output.writeBytes(1, getChunkKeyBytes());
  162. }
  163. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  164. output.writeMessage(2, objectInfo_);
  165. }
  166. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  167. output.writeFixed64(3, time_);
  168. }
  169. getUnknownFields().writeTo(output);
  170. }
  171. private int memoizedSerializedSize = -1;
  172. public int getSerializedSize() {
  173. int size = memoizedSerializedSize;
  174. if (size != -1) return size;
  175. size = 0;
  176. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  177. size += com.google.protobuf.CodedOutputStream
  178. .computeBytesSize(1, getChunkKeyBytes());
  179. }
  180. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  181. size += com.google.protobuf.CodedOutputStream
  182. .computeMessageSize(2, objectInfo_);
  183. }
  184. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  185. size += com.google.protobuf.CodedOutputStream
  186. .computeFixed64Size(3, time_);
  187. }
  188. size += getUnknownFields().getSerializedSize();
  189. memoizedSerializedSize = size;
  190. return size;
  191. }
  192. @java.lang.Override
  193. protected Object writeReplace() throws java.io.ObjectStreamException {
  194. return super.writeReplace();
  195. }
  196. @java.lang.Override
  197. public boolean equals(final Object obj) {
  198. if (obj == this) {
  199. return true;
  200. }
  201. if (!(obj instanceof org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item)) {
  202. return super.equals(obj);
  203. }
  204. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item other = (org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item) obj;
  205. boolean result = true;
  206. result = result && (hasChunkKey() == other.hasChunkKey());
  207. if (hasChunkKey()) {
  208. result = result && getChunkKey()
  209. .equals(other.getChunkKey());
  210. }
  211. result = result && (hasObjectInfo() == other.hasObjectInfo());
  212. if (hasObjectInfo()) {
  213. result = result && getObjectInfo()
  214. .equals(other.getObjectInfo());
  215. }
  216. result = result && (hasTime() == other.hasTime());
  217. if (hasTime()) {
  218. result = result && (getTime()
  219. == other.getTime());
  220. }
  221. result = result &&
  222. getUnknownFields().equals(other.getUnknownFields());
  223. return result;
  224. }
  225. @java.lang.Override
  226. public int hashCode() {
  227. int hash = 41;
  228. hash = (19 * hash) + getDescriptorForType().hashCode();
  229. if (hasChunkKey()) {
  230. hash = (37 * hash) + CHUNK_KEY_FIELD_NUMBER;
  231. hash = (53 * hash) + getChunkKey().hashCode();
  232. }
  233. if (hasObjectInfo()) {
  234. hash = (37 * hash) + OBJECT_INFO_FIELD_NUMBER;
  235. hash = (53 * hash) + getObjectInfo().hashCode();
  236. }
  237. if (hasTime()) {
  238. hash = (37 * hash) + TIME_FIELD_NUMBER;
  239. hash = (53 * hash) + hashLong(getTime());
  240. }
  241. hash = (29 * hash) + getUnknownFields().hashCode();
  242. return hash;
  243. }
  244. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseFrom(
  245. com.google.protobuf.ByteString data)
  246. throws com.google.protobuf.InvalidProtocolBufferException {
  247. return newBuilder().mergeFrom(data).buildParsed();
  248. }
  249. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseFrom(
  250. com.google.protobuf.ByteString data,
  251. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  252. throws com.google.protobuf.InvalidProtocolBufferException {
  253. return newBuilder().mergeFrom(data, extensionRegistry)
  254. .buildParsed();
  255. }
  256. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseFrom(byte[] data)
  257. throws com.google.protobuf.InvalidProtocolBufferException {
  258. return newBuilder().mergeFrom(data).buildParsed();
  259. }
  260. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseFrom(
  261. byte[] data,
  262. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  263. throws com.google.protobuf.InvalidProtocolBufferException {
  264. return newBuilder().mergeFrom(data, extensionRegistry)
  265. .buildParsed();
  266. }
  267. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseFrom(java.io.InputStream input)
  268. throws java.io.IOException {
  269. return newBuilder().mergeFrom(input).buildParsed();
  270. }
  271. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseFrom(
  272. java.io.InputStream input,
  273. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  274. throws java.io.IOException {
  275. return newBuilder().mergeFrom(input, extensionRegistry)
  276. .buildParsed();
  277. }
  278. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseDelimitedFrom(java.io.InputStream input)
  279. throws java.io.IOException {
  280. Builder builder = newBuilder();
  281. if (builder.mergeDelimitedFrom(input)) {
  282. return builder.buildParsed();
  283. } else {
  284. return null;
  285. }
  286. }
  287. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseDelimitedFrom(
  288. java.io.InputStream input,
  289. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  290. throws java.io.IOException {
  291. Builder builder = newBuilder();
  292. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  293. return builder.buildParsed();
  294. } else {
  295. return null;
  296. }
  297. }
  298. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseFrom(
  299. com.google.protobuf.CodedInputStream input)
  300. throws java.io.IOException {
  301. return newBuilder().mergeFrom(input).buildParsed();
  302. }
  303. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item parseFrom(
  304. com.google.protobuf.CodedInputStream input,
  305. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  306. throws java.io.IOException {
  307. return newBuilder().mergeFrom(input, extensionRegistry)
  308. .buildParsed();
  309. }
  310. public static Builder newBuilder() { return Builder.create(); }
  311. public Builder newBuilderForType() { return newBuilder(); }
  312. public static Builder newBuilder(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item prototype) {
  313. return newBuilder().mergeFrom(prototype);
  314. }
  315. public Builder toBuilder() { return newBuilder(this); }
  316. @java.lang.Override
  317. protected Builder newBuilderForType(
  318. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  319. Builder builder = new Builder(parent);
  320. return builder;
  321. }
  322. public static final class Builder extends
  323. com.google.protobuf.GeneratedMessage.Builder<Builder>
  324. implements org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder {
  325. public static final com.google.protobuf.Descriptors.Descriptor
  326. getDescriptor() {
  327. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_descriptor;
  328. }
  329. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  330. internalGetFieldAccessorTable() {
  331. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_fieldAccessorTable;
  332. }
  333. // Construct using org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.newBuilder()
  334. private Builder() {
  335. maybeForceBuilderInitialization();
  336. }
  337. private Builder(BuilderParent parent) {
  338. super(parent);
  339. maybeForceBuilderInitialization();
  340. }
  341. private void maybeForceBuilderInitialization() {
  342. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  343. getObjectInfoFieldBuilder();
  344. }
  345. }
  346. private static Builder create() {
  347. return new Builder();
  348. }
  349. public Builder clear() {
  350. super.clear();
  351. chunkKey_ = "";
  352. bitField0_ = (bitField0_ & ~0x00000001);
  353. if (objectInfoBuilder_ == null) {
  354. objectInfo_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.getDefaultInstance();
  355. } else {
  356. objectInfoBuilder_.clear();
  357. }
  358. bitField0_ = (bitField0_ & ~0x00000002);
  359. time_ = 0L;
  360. bitField0_ = (bitField0_ & ~0x00000004);
  361. return this;
  362. }
  363. public Builder clone() {
  364. return create().mergeFrom(buildPartial());
  365. }
  366. public com.google.protobuf.Descriptors.Descriptor
  367. getDescriptorForType() {
  368. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.getDescriptor();
  369. }
  370. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item getDefaultInstanceForType() {
  371. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.getDefaultInstance();
  372. }
  373. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item build() {
  374. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item result = buildPartial();
  375. if (!result.isInitialized()) {
  376. throw newUninitializedMessageException(result);
  377. }
  378. return result;
  379. }
  380. private org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item buildParsed()
  381. throws com.google.protobuf.InvalidProtocolBufferException {
  382. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item result = buildPartial();
  383. if (!result.isInitialized()) {
  384. throw newUninitializedMessageException(
  385. result).asInvalidProtocolBufferException();
  386. }
  387. return result;
  388. }
  389. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item buildPartial() {
  390. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item result = new org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item(this);
  391. int from_bitField0_ = bitField0_;
  392. int to_bitField0_ = 0;
  393. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  394. to_bitField0_ |= 0x00000001;
  395. }
  396. result.chunkKey_ = chunkKey_;
  397. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  398. to_bitField0_ |= 0x00000002;
  399. }
  400. if (objectInfoBuilder_ == null) {
  401. result.objectInfo_ = objectInfo_;
  402. } else {
  403. result.objectInfo_ = objectInfoBuilder_.build();
  404. }
  405. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  406. to_bitField0_ |= 0x00000004;
  407. }
  408. result.time_ = time_;
  409. result.bitField0_ = to_bitField0_;
  410. onBuilt();
  411. return result;
  412. }
  413. public Builder mergeFrom(com.google.protobuf.Message other) {
  414. if (other instanceof org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item) {
  415. return mergeFrom((org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item)other);
  416. } else {
  417. super.mergeFrom(other);
  418. return this;
  419. }
  420. }
  421. public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item other) {
  422. if (other == org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.getDefaultInstance()) return this;
  423. if (other.hasChunkKey()) {
  424. setChunkKey(other.getChunkKey());
  425. }
  426. if (other.hasObjectInfo()) {
  427. mergeObjectInfo(other.getObjectInfo());
  428. }
  429. if (other.hasTime()) {
  430. setTime(other.getTime());
  431. }
  432. this.mergeUnknownFields(other.getUnknownFields());
  433. return this;
  434. }
  435. public final boolean isInitialized() {
  436. if (!hasChunkKey()) {
  437. return false;
  438. }
  439. if (!hasObjectInfo()) {
  440. return false;
  441. }
  442. if (!getObjectInfo().isInitialized()) {
  443. return false;
  444. }
  445. return true;
  446. }
  447. public Builder mergeFrom(
  448. com.google.protobuf.CodedInputStream input,
  449. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  450. throws java.io.IOException {
  451. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  452. com.google.protobuf.UnknownFieldSet.newBuilder(
  453. this.getUnknownFields());
  454. while (true) {
  455. int tag = input.readTag();
  456. switch (tag) {
  457. case 0:
  458. this.setUnknownFields(unknownFields.build());
  459. onChanged();
  460. return this;
  461. default: {
  462. if (!parseUnknownField(input, unknownFields,
  463. extensionRegistry, tag)) {
  464. this.setUnknownFields(unknownFields.build());
  465. onChanged();
  466. return this;
  467. }
  468. break;
  469. }
  470. case 10: {
  471. bitField0_ |= 0x00000001;
  472. chunkKey_ = input.readBytes();
  473. break;
  474. }
  475. case 18: {
  476. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.Builder subBuilder = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.newBuilder();
  477. if (hasObjectInfo()) {
  478. subBuilder.mergeFrom(getObjectInfo());
  479. }
  480. input.readMessage(subBuilder, extensionRegistry);
  481. setObjectInfo(subBuilder.buildPartial());
  482. break;
  483. }
  484. case 25: {
  485. bitField0_ |= 0x00000004;
  486. time_ = input.readFixed64();
  487. break;
  488. }
  489. }
  490. }
  491. }
  492. private int bitField0_;
  493. // required string chunk_key = 1;
  494. private Object chunkKey_ = "";
  495. public boolean hasChunkKey() {
  496. return ((bitField0_ & 0x00000001) == 0x00000001);
  497. }
  498. public String getChunkKey() {
  499. Object ref = chunkKey_;
  500. if (!(ref instanceof String)) {
  501. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  502. chunkKey_ = s;
  503. return s;
  504. } else {
  505. return (String) ref;
  506. }
  507. }
  508. public Builder setChunkKey(String value) {
  509. if (value == null) {
  510. throw new NullPointerException();
  511. }
  512. bitField0_ |= 0x00000001;
  513. chunkKey_ = value;
  514. onChanged();
  515. return this;
  516. }
  517. public Builder clearChunkKey() {
  518. bitField0_ = (bitField0_ & ~0x00000001);
  519. chunkKey_ = getDefaultInstance().getChunkKey();
  520. onChanged();
  521. return this;
  522. }
  523. void setChunkKey(com.google.protobuf.ByteString value) {
  524. bitField0_ |= 0x00000001;
  525. chunkKey_ = value;
  526. onChanged();
  527. }
  528. // required .org.eclipse.jgit.storage.dht.ObjectInfo object_info = 2;
  529. private org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo objectInfo_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.getDefaultInstance();
  530. private com.google.protobuf.SingleFieldBuilder<
  531. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfoOrBuilder> objectInfoBuilder_;
  532. public boolean hasObjectInfo() {
  533. return ((bitField0_ & 0x00000002) == 0x00000002);
  534. }
  535. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo getObjectInfo() {
  536. if (objectInfoBuilder_ == null) {
  537. return objectInfo_;
  538. } else {
  539. return objectInfoBuilder_.getMessage();
  540. }
  541. }
  542. public Builder setObjectInfo(org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo value) {
  543. if (objectInfoBuilder_ == null) {
  544. if (value == null) {
  545. throw new NullPointerException();
  546. }
  547. objectInfo_ = value;
  548. onChanged();
  549. } else {
  550. objectInfoBuilder_.setMessage(value);
  551. }
  552. bitField0_ |= 0x00000002;
  553. return this;
  554. }
  555. public Builder setObjectInfo(
  556. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.Builder builderForValue) {
  557. if (objectInfoBuilder_ == null) {
  558. objectInfo_ = builderForValue.build();
  559. onChanged();
  560. } else {
  561. objectInfoBuilder_.setMessage(builderForValue.build());
  562. }
  563. bitField0_ |= 0x00000002;
  564. return this;
  565. }
  566. public Builder mergeObjectInfo(org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo value) {
  567. if (objectInfoBuilder_ == null) {
  568. if (((bitField0_ & 0x00000002) == 0x00000002) &&
  569. objectInfo_ != org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.getDefaultInstance()) {
  570. objectInfo_ =
  571. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.newBuilder(objectInfo_).mergeFrom(value).buildPartial();
  572. } else {
  573. objectInfo_ = value;
  574. }
  575. onChanged();
  576. } else {
  577. objectInfoBuilder_.mergeFrom(value);
  578. }
  579. bitField0_ |= 0x00000002;
  580. return this;
  581. }
  582. public Builder clearObjectInfo() {
  583. if (objectInfoBuilder_ == null) {
  584. objectInfo_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.getDefaultInstance();
  585. onChanged();
  586. } else {
  587. objectInfoBuilder_.clear();
  588. }
  589. bitField0_ = (bitField0_ & ~0x00000002);
  590. return this;
  591. }
  592. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.Builder getObjectInfoBuilder() {
  593. bitField0_ |= 0x00000002;
  594. onChanged();
  595. return getObjectInfoFieldBuilder().getBuilder();
  596. }
  597. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfoOrBuilder getObjectInfoOrBuilder() {
  598. if (objectInfoBuilder_ != null) {
  599. return objectInfoBuilder_.getMessageOrBuilder();
  600. } else {
  601. return objectInfo_;
  602. }
  603. }
  604. private com.google.protobuf.SingleFieldBuilder<
  605. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfoOrBuilder>
  606. getObjectInfoFieldBuilder() {
  607. if (objectInfoBuilder_ == null) {
  608. objectInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
  609. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfo.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ObjectInfoOrBuilder>(
  610. objectInfo_,
  611. getParentForChildren(),
  612. isClean());
  613. objectInfo_ = null;
  614. }
  615. return objectInfoBuilder_;
  616. }
  617. // optional fixed64 time = 3;
  618. private long time_ ;
  619. public boolean hasTime() {
  620. return ((bitField0_ & 0x00000004) == 0x00000004);
  621. }
  622. public long getTime() {
  623. return time_;
  624. }
  625. public Builder setTime(long value) {
  626. bitField0_ |= 0x00000004;
  627. time_ = value;
  628. onChanged();
  629. return this;
  630. }
  631. public Builder clearTime() {
  632. bitField0_ = (bitField0_ & ~0x00000004);
  633. time_ = 0L;
  634. onChanged();
  635. return this;
  636. }
  637. // @@protoc_insertion_point(builder_scope:org.eclipse.jgit.storage.dht.CachedObjectIndex.Item)
  638. }
  639. static {
  640. defaultInstance = new Item(true);
  641. defaultInstance.initFields();
  642. }
  643. // @@protoc_insertion_point(class_scope:org.eclipse.jgit.storage.dht.CachedObjectIndex.Item)
  644. }
  645. // repeated .org.eclipse.jgit.storage.dht.CachedObjectIndex.Item item = 1;
  646. public static final int ITEM_FIELD_NUMBER = 1;
  647. private java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item> item_;
  648. public java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item> getItemList() {
  649. return item_;
  650. }
  651. public java.util.List<? extends org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder>
  652. getItemOrBuilderList() {
  653. return item_;
  654. }
  655. public int getItemCount() {
  656. return item_.size();
  657. }
  658. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item getItem(int index) {
  659. return item_.get(index);
  660. }
  661. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder getItemOrBuilder(
  662. int index) {
  663. return item_.get(index);
  664. }
  665. private void initFields() {
  666. item_ = java.util.Collections.emptyList();
  667. }
  668. private byte memoizedIsInitialized = -1;
  669. public final boolean isInitialized() {
  670. byte isInitialized = memoizedIsInitialized;
  671. if (isInitialized != -1) return isInitialized == 1;
  672. for (int i = 0; i < getItemCount(); i++) {
  673. if (!getItem(i).isInitialized()) {
  674. memoizedIsInitialized = 0;
  675. return false;
  676. }
  677. }
  678. memoizedIsInitialized = 1;
  679. return true;
  680. }
  681. public void writeTo(com.google.protobuf.CodedOutputStream output)
  682. throws java.io.IOException {
  683. getSerializedSize();
  684. for (int i = 0; i < item_.size(); i++) {
  685. output.writeMessage(1, item_.get(i));
  686. }
  687. getUnknownFields().writeTo(output);
  688. }
  689. private int memoizedSerializedSize = -1;
  690. public int getSerializedSize() {
  691. int size = memoizedSerializedSize;
  692. if (size != -1) return size;
  693. size = 0;
  694. for (int i = 0; i < item_.size(); i++) {
  695. size += com.google.protobuf.CodedOutputStream
  696. .computeMessageSize(1, item_.get(i));
  697. }
  698. size += getUnknownFields().getSerializedSize();
  699. memoizedSerializedSize = size;
  700. return size;
  701. }
  702. @java.lang.Override
  703. protected Object writeReplace() throws java.io.ObjectStreamException {
  704. return super.writeReplace();
  705. }
  706. @java.lang.Override
  707. public boolean equals(final Object obj) {
  708. if (obj == this) {
  709. return true;
  710. }
  711. if (!(obj instanceof org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex)) {
  712. return super.equals(obj);
  713. }
  714. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex other = (org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex) obj;
  715. boolean result = true;
  716. result = result && getItemList()
  717. .equals(other.getItemList());
  718. result = result &&
  719. getUnknownFields().equals(other.getUnknownFields());
  720. return result;
  721. }
  722. @java.lang.Override
  723. public int hashCode() {
  724. int hash = 41;
  725. hash = (19 * hash) + getDescriptorForType().hashCode();
  726. if (getItemCount() > 0) {
  727. hash = (37 * hash) + ITEM_FIELD_NUMBER;
  728. hash = (53 * hash) + getItemList().hashCode();
  729. }
  730. hash = (29 * hash) + getUnknownFields().hashCode();
  731. return hash;
  732. }
  733. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseFrom(
  734. com.google.protobuf.ByteString data)
  735. throws com.google.protobuf.InvalidProtocolBufferException {
  736. return newBuilder().mergeFrom(data).buildParsed();
  737. }
  738. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseFrom(
  739. com.google.protobuf.ByteString data,
  740. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  741. throws com.google.protobuf.InvalidProtocolBufferException {
  742. return newBuilder().mergeFrom(data, extensionRegistry)
  743. .buildParsed();
  744. }
  745. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseFrom(byte[] data)
  746. throws com.google.protobuf.InvalidProtocolBufferException {
  747. return newBuilder().mergeFrom(data).buildParsed();
  748. }
  749. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseFrom(
  750. byte[] data,
  751. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  752. throws com.google.protobuf.InvalidProtocolBufferException {
  753. return newBuilder().mergeFrom(data, extensionRegistry)
  754. .buildParsed();
  755. }
  756. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseFrom(java.io.InputStream input)
  757. throws java.io.IOException {
  758. return newBuilder().mergeFrom(input).buildParsed();
  759. }
  760. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseFrom(
  761. java.io.InputStream input,
  762. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  763. throws java.io.IOException {
  764. return newBuilder().mergeFrom(input, extensionRegistry)
  765. .buildParsed();
  766. }
  767. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseDelimitedFrom(java.io.InputStream input)
  768. throws java.io.IOException {
  769. Builder builder = newBuilder();
  770. if (builder.mergeDelimitedFrom(input)) {
  771. return builder.buildParsed();
  772. } else {
  773. return null;
  774. }
  775. }
  776. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseDelimitedFrom(
  777. java.io.InputStream input,
  778. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  779. throws java.io.IOException {
  780. Builder builder = newBuilder();
  781. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  782. return builder.buildParsed();
  783. } else {
  784. return null;
  785. }
  786. }
  787. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseFrom(
  788. com.google.protobuf.CodedInputStream input)
  789. throws java.io.IOException {
  790. return newBuilder().mergeFrom(input).buildParsed();
  791. }
  792. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex parseFrom(
  793. com.google.protobuf.CodedInputStream input,
  794. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  795. throws java.io.IOException {
  796. return newBuilder().mergeFrom(input, extensionRegistry)
  797. .buildParsed();
  798. }
  799. public static Builder newBuilder() { return Builder.create(); }
  800. public Builder newBuilderForType() { return newBuilder(); }
  801. public static Builder newBuilder(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex prototype) {
  802. return newBuilder().mergeFrom(prototype);
  803. }
  804. public Builder toBuilder() { return newBuilder(this); }
  805. @java.lang.Override
  806. protected Builder newBuilderForType(
  807. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  808. Builder builder = new Builder(parent);
  809. return builder;
  810. }
  811. public static final class Builder extends
  812. com.google.protobuf.GeneratedMessage.Builder<Builder>
  813. implements org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndexOrBuilder {
  814. public static final com.google.protobuf.Descriptors.Descriptor
  815. getDescriptor() {
  816. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_descriptor;
  817. }
  818. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  819. internalGetFieldAccessorTable() {
  820. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_fieldAccessorTable;
  821. }
  822. // Construct using org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.newBuilder()
  823. private Builder() {
  824. maybeForceBuilderInitialization();
  825. }
  826. private Builder(BuilderParent parent) {
  827. super(parent);
  828. maybeForceBuilderInitialization();
  829. }
  830. private void maybeForceBuilderInitialization() {
  831. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  832. getItemFieldBuilder();
  833. }
  834. }
  835. private static Builder create() {
  836. return new Builder();
  837. }
  838. public Builder clear() {
  839. super.clear();
  840. if (itemBuilder_ == null) {
  841. item_ = java.util.Collections.emptyList();
  842. bitField0_ = (bitField0_ & ~0x00000001);
  843. } else {
  844. itemBuilder_.clear();
  845. }
  846. return this;
  847. }
  848. public Builder clone() {
  849. return create().mergeFrom(buildPartial());
  850. }
  851. public com.google.protobuf.Descriptors.Descriptor
  852. getDescriptorForType() {
  853. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.getDescriptor();
  854. }
  855. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex getDefaultInstanceForType() {
  856. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.getDefaultInstance();
  857. }
  858. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex build() {
  859. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex result = buildPartial();
  860. if (!result.isInitialized()) {
  861. throw newUninitializedMessageException(result);
  862. }
  863. return result;
  864. }
  865. private org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex buildParsed()
  866. throws com.google.protobuf.InvalidProtocolBufferException {
  867. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex result = buildPartial();
  868. if (!result.isInitialized()) {
  869. throw newUninitializedMessageException(
  870. result).asInvalidProtocolBufferException();
  871. }
  872. return result;
  873. }
  874. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex buildPartial() {
  875. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex result = new org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex(this);
  876. int from_bitField0_ = bitField0_;
  877. if (itemBuilder_ == null) {
  878. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  879. item_ = java.util.Collections.unmodifiableList(item_);
  880. bitField0_ = (bitField0_ & ~0x00000001);
  881. }
  882. result.item_ = item_;
  883. } else {
  884. result.item_ = itemBuilder_.build();
  885. }
  886. onBuilt();
  887. return result;
  888. }
  889. public Builder mergeFrom(com.google.protobuf.Message other) {
  890. if (other instanceof org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex) {
  891. return mergeFrom((org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex)other);
  892. } else {
  893. super.mergeFrom(other);
  894. return this;
  895. }
  896. }
  897. public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex other) {
  898. if (other == org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.getDefaultInstance()) return this;
  899. if (itemBuilder_ == null) {
  900. if (!other.item_.isEmpty()) {
  901. if (item_.isEmpty()) {
  902. item_ = other.item_;
  903. bitField0_ = (bitField0_ & ~0x00000001);
  904. } else {
  905. ensureItemIsMutable();
  906. item_.addAll(other.item_);
  907. }
  908. onChanged();
  909. }
  910. } else {
  911. if (!other.item_.isEmpty()) {
  912. if (itemBuilder_.isEmpty()) {
  913. itemBuilder_.dispose();
  914. itemBuilder_ = null;
  915. item_ = other.item_;
  916. bitField0_ = (bitField0_ & ~0x00000001);
  917. itemBuilder_ =
  918. com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
  919. getItemFieldBuilder() : null;
  920. } else {
  921. itemBuilder_.addAllMessages(other.item_);
  922. }
  923. }
  924. }
  925. this.mergeUnknownFields(other.getUnknownFields());
  926. return this;
  927. }
  928. public final boolean isInitialized() {
  929. for (int i = 0; i < getItemCount(); i++) {
  930. if (!getItem(i).isInitialized()) {
  931. return false;
  932. }
  933. }
  934. return true;
  935. }
  936. public Builder mergeFrom(
  937. com.google.protobuf.CodedInputStream input,
  938. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  939. throws java.io.IOException {
  940. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  941. com.google.protobuf.UnknownFieldSet.newBuilder(
  942. this.getUnknownFields());
  943. while (true) {
  944. int tag = input.readTag();
  945. switch (tag) {
  946. case 0:
  947. this.setUnknownFields(unknownFields.build());
  948. onChanged();
  949. return this;
  950. default: {
  951. if (!parseUnknownField(input, unknownFields,
  952. extensionRegistry, tag)) {
  953. this.setUnknownFields(unknownFields.build());
  954. onChanged();
  955. return this;
  956. }
  957. break;
  958. }
  959. case 10: {
  960. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder subBuilder = org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.newBuilder();
  961. input.readMessage(subBuilder, extensionRegistry);
  962. addItem(subBuilder.buildPartial());
  963. break;
  964. }
  965. }
  966. }
  967. }
  968. private int bitField0_;
  969. // repeated .org.eclipse.jgit.storage.dht.CachedObjectIndex.Item item = 1;
  970. private java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item> item_ =
  971. java.util.Collections.emptyList();
  972. private void ensureItemIsMutable() {
  973. if (!((bitField0_ & 0x00000001) == 0x00000001)) {
  974. item_ = new java.util.ArrayList<org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item>(item_);
  975. bitField0_ |= 0x00000001;
  976. }
  977. }
  978. private com.google.protobuf.RepeatedFieldBuilder<
  979. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder> itemBuilder_;
  980. public java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item> getItemList() {
  981. if (itemBuilder_ == null) {
  982. return java.util.Collections.unmodifiableList(item_);
  983. } else {
  984. return itemBuilder_.getMessageList();
  985. }
  986. }
  987. public int getItemCount() {
  988. if (itemBuilder_ == null) {
  989. return item_.size();
  990. } else {
  991. return itemBuilder_.getCount();
  992. }
  993. }
  994. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item getItem(int index) {
  995. if (itemBuilder_ == null) {
  996. return item_.get(index);
  997. } else {
  998. return itemBuilder_.getMessage(index);
  999. }
  1000. }
  1001. public Builder setItem(
  1002. int index, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item value) {
  1003. if (itemBuilder_ == null) {
  1004. if (value == null) {
  1005. throw new NullPointerException();
  1006. }
  1007. ensureItemIsMutable();
  1008. item_.set(index, value);
  1009. onChanged();
  1010. } else {
  1011. itemBuilder_.setMessage(index, value);
  1012. }
  1013. return this;
  1014. }
  1015. public Builder setItem(
  1016. int index, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder builderForValue) {
  1017. if (itemBuilder_ == null) {
  1018. ensureItemIsMutable();
  1019. item_.set(index, builderForValue.build());
  1020. onChanged();
  1021. } else {
  1022. itemBuilder_.setMessage(index, builderForValue.build());
  1023. }
  1024. return this;
  1025. }
  1026. public Builder addItem(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item value) {
  1027. if (itemBuilder_ == null) {
  1028. if (value == null) {
  1029. throw new NullPointerException();
  1030. }
  1031. ensureItemIsMutable();
  1032. item_.add(value);
  1033. onChanged();
  1034. } else {
  1035. itemBuilder_.addMessage(value);
  1036. }
  1037. return this;
  1038. }
  1039. public Builder addItem(
  1040. int index, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item value) {
  1041. if (itemBuilder_ == null) {
  1042. if (value == null) {
  1043. throw new NullPointerException();
  1044. }
  1045. ensureItemIsMutable();
  1046. item_.add(index, value);
  1047. onChanged();
  1048. } else {
  1049. itemBuilder_.addMessage(index, value);
  1050. }
  1051. return this;
  1052. }
  1053. public Builder addItem(
  1054. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder builderForValue) {
  1055. if (itemBuilder_ == null) {
  1056. ensureItemIsMutable();
  1057. item_.add(builderForValue.build());
  1058. onChanged();
  1059. } else {
  1060. itemBuilder_.addMessage(builderForValue.build());
  1061. }
  1062. return this;
  1063. }
  1064. public Builder addItem(
  1065. int index, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder builderForValue) {
  1066. if (itemBuilder_ == null) {
  1067. ensureItemIsMutable();
  1068. item_.add(index, builderForValue.build());
  1069. onChanged();
  1070. } else {
  1071. itemBuilder_.addMessage(index, builderForValue.build());
  1072. }
  1073. return this;
  1074. }
  1075. public Builder addAllItem(
  1076. java.lang.Iterable<? extends org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item> values) {
  1077. if (itemBuilder_ == null) {
  1078. ensureItemIsMutable();
  1079. super.addAll(values, item_);
  1080. onChanged();
  1081. } else {
  1082. itemBuilder_.addAllMessages(values);
  1083. }
  1084. return this;
  1085. }
  1086. public Builder clearItem() {
  1087. if (itemBuilder_ == null) {
  1088. item_ = java.util.Collections.emptyList();
  1089. bitField0_ = (bitField0_ & ~0x00000001);
  1090. onChanged();
  1091. } else {
  1092. itemBuilder_.clear();
  1093. }
  1094. return this;
  1095. }
  1096. public Builder removeItem(int index) {
  1097. if (itemBuilder_ == null) {
  1098. ensureItemIsMutable();
  1099. item_.remove(index);
  1100. onChanged();
  1101. } else {
  1102. itemBuilder_.remove(index);
  1103. }
  1104. return this;
  1105. }
  1106. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder getItemBuilder(
  1107. int index) {
  1108. return getItemFieldBuilder().getBuilder(index);
  1109. }
  1110. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder getItemOrBuilder(
  1111. int index) {
  1112. if (itemBuilder_ == null) {
  1113. return item_.get(index); } else {
  1114. return itemBuilder_.getMessageOrBuilder(index);
  1115. }
  1116. }
  1117. public java.util.List<? extends org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder>
  1118. getItemOrBuilderList() {
  1119. if (itemBuilder_ != null) {
  1120. return itemBuilder_.getMessageOrBuilderList();
  1121. } else {
  1122. return java.util.Collections.unmodifiableList(item_);
  1123. }
  1124. }
  1125. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder addItemBuilder() {
  1126. return getItemFieldBuilder().addBuilder(
  1127. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.getDefaultInstance());
  1128. }
  1129. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder addItemBuilder(
  1130. int index) {
  1131. return getItemFieldBuilder().addBuilder(
  1132. index, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.getDefaultInstance());
  1133. }
  1134. public java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder>
  1135. getItemBuilderList() {
  1136. return getItemFieldBuilder().getBuilderList();
  1137. }
  1138. private com.google.protobuf.RepeatedFieldBuilder<
  1139. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder>
  1140. getItemFieldBuilder() {
  1141. if (itemBuilder_ == null) {
  1142. itemBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
  1143. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.ItemOrBuilder>(
  1144. item_,
  1145. ((bitField0_ & 0x00000001) == 0x00000001),
  1146. getParentForChildren(),
  1147. isClean());
  1148. item_ = null;
  1149. }
  1150. return itemBuilder_;
  1151. }
  1152. // @@protoc_insertion_point(builder_scope:org.eclipse.jgit.storage.dht.CachedObjectIndex)
  1153. }
  1154. static {
  1155. defaultInstance = new CachedObjectIndex(true);
  1156. defaultInstance.initFields();
  1157. }
  1158. // @@protoc_insertion_point(class_scope:org.eclipse.jgit.storage.dht.CachedObjectIndex)
  1159. }
  1160. public interface CachedPackInfoListOrBuilder
  1161. extends com.google.protobuf.MessageOrBuilder {
  1162. // repeated .org.eclipse.jgit.storage.dht.CachedPackInfo pack = 1;
  1163. java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo>
  1164. getPackList();
  1165. org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo getPack(int index);
  1166. int getPackCount();
  1167. java.util.List<? extends org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder>
  1168. getPackOrBuilderList();
  1169. org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder getPackOrBuilder(
  1170. int index);
  1171. }
  1172. public static final class CachedPackInfoList extends
  1173. com.google.protobuf.GeneratedMessage
  1174. implements CachedPackInfoListOrBuilder {
  1175. // Use CachedPackInfoList.newBuilder() to construct.
  1176. private CachedPackInfoList(Builder builder) {
  1177. super(builder);
  1178. }
  1179. private CachedPackInfoList(boolean noInit) {}
  1180. private static final CachedPackInfoList defaultInstance;
  1181. public static CachedPackInfoList getDefaultInstance() {
  1182. return defaultInstance;
  1183. }
  1184. public CachedPackInfoList getDefaultInstanceForType() {
  1185. return defaultInstance;
  1186. }
  1187. public static final com.google.protobuf.Descriptors.Descriptor
  1188. getDescriptor() {
  1189. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_descriptor;
  1190. }
  1191. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1192. internalGetFieldAccessorTable() {
  1193. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_fieldAccessorTable;
  1194. }
  1195. // repeated .org.eclipse.jgit.storage.dht.CachedPackInfo pack = 1;
  1196. public static final int PACK_FIELD_NUMBER = 1;
  1197. private java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo> pack_;
  1198. public java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo> getPackList() {
  1199. return pack_;
  1200. }
  1201. public java.util.List<? extends org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder>
  1202. getPackOrBuilderList() {
  1203. return pack_;
  1204. }
  1205. public int getPackCount() {
  1206. return pack_.size();
  1207. }
  1208. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo getPack(int index) {
  1209. return pack_.get(index);
  1210. }
  1211. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder getPackOrBuilder(
  1212. int index) {
  1213. return pack_.get(index);
  1214. }
  1215. private void initFields() {
  1216. pack_ = java.util.Collections.emptyList();
  1217. }
  1218. private byte memoizedIsInitialized = -1;
  1219. public final boolean isInitialized() {
  1220. byte isInitialized = memoizedIsInitialized;
  1221. if (isInitialized != -1) return isInitialized == 1;
  1222. for (int i = 0; i < getPackCount(); i++) {
  1223. if (!getPack(i).isInitialized()) {
  1224. memoizedIsInitialized = 0;
  1225. return false;
  1226. }
  1227. }
  1228. memoizedIsInitialized = 1;
  1229. return true;
  1230. }
  1231. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1232. throws java.io.IOException {
  1233. getSerializedSize();
  1234. for (int i = 0; i < pack_.size(); i++) {
  1235. output.writeMessage(1, pack_.get(i));
  1236. }
  1237. getUnknownFields().writeTo(output);
  1238. }
  1239. private int memoizedSerializedSize = -1;
  1240. public int getSerializedSize() {
  1241. int size = memoizedSerializedSize;
  1242. if (size != -1) return size;
  1243. size = 0;
  1244. for (int i = 0; i < pack_.size(); i++) {
  1245. size += com.google.protobuf.CodedOutputStream
  1246. .computeMessageSize(1, pack_.get(i));
  1247. }
  1248. size += getUnknownFields().getSerializedSize();
  1249. memoizedSerializedSize = size;
  1250. return size;
  1251. }
  1252. @java.lang.Override
  1253. protected Object writeReplace() throws java.io.ObjectStreamException {
  1254. return super.writeReplace();
  1255. }
  1256. @java.lang.Override
  1257. public boolean equals(final Object obj) {
  1258. if (obj == this) {
  1259. return true;
  1260. }
  1261. if (!(obj instanceof org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList)) {
  1262. return super.equals(obj);
  1263. }
  1264. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList other = (org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList) obj;
  1265. boolean result = true;
  1266. result = result && getPackList()
  1267. .equals(other.getPackList());
  1268. result = result &&
  1269. getUnknownFields().equals(other.getUnknownFields());
  1270. return result;
  1271. }
  1272. @java.lang.Override
  1273. public int hashCode() {
  1274. int hash = 41;
  1275. hash = (19 * hash) + getDescriptorForType().hashCode();
  1276. if (getPackCount() > 0) {
  1277. hash = (37 * hash) + PACK_FIELD_NUMBER;
  1278. hash = (53 * hash) + getPackList().hashCode();
  1279. }
  1280. hash = (29 * hash) + getUnknownFields().hashCode();
  1281. return hash;
  1282. }
  1283. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseFrom(
  1284. com.google.protobuf.ByteString data)
  1285. throws com.google.protobuf.InvalidProtocolBufferException {
  1286. return newBuilder().mergeFrom(data).buildParsed();
  1287. }
  1288. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseFrom(
  1289. com.google.protobuf.ByteString data,
  1290. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1291. throws com.google.protobuf.InvalidProtocolBufferException {
  1292. return newBuilder().mergeFrom(data, extensionRegistry)
  1293. .buildParsed();
  1294. }
  1295. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseFrom(byte[] data)
  1296. throws com.google.protobuf.InvalidProtocolBufferException {
  1297. return newBuilder().mergeFrom(data).buildParsed();
  1298. }
  1299. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseFrom(
  1300. byte[] data,
  1301. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1302. throws com.google.protobuf.InvalidProtocolBufferException {
  1303. return newBuilder().mergeFrom(data, extensionRegistry)
  1304. .buildParsed();
  1305. }
  1306. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseFrom(java.io.InputStream input)
  1307. throws java.io.IOException {
  1308. return newBuilder().mergeFrom(input).buildParsed();
  1309. }
  1310. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseFrom(
  1311. java.io.InputStream input,
  1312. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1313. throws java.io.IOException {
  1314. return newBuilder().mergeFrom(input, extensionRegistry)
  1315. .buildParsed();
  1316. }
  1317. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseDelimitedFrom(java.io.InputStream input)
  1318. throws java.io.IOException {
  1319. Builder builder = newBuilder();
  1320. if (builder.mergeDelimitedFrom(input)) {
  1321. return builder.buildParsed();
  1322. } else {
  1323. return null;
  1324. }
  1325. }
  1326. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseDelimitedFrom(
  1327. java.io.InputStream input,
  1328. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1329. throws java.io.IOException {
  1330. Builder builder = newBuilder();
  1331. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1332. return builder.buildParsed();
  1333. } else {
  1334. return null;
  1335. }
  1336. }
  1337. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseFrom(
  1338. com.google.protobuf.CodedInputStream input)
  1339. throws java.io.IOException {
  1340. return newBuilder().mergeFrom(input).buildParsed();
  1341. }
  1342. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList parseFrom(
  1343. com.google.protobuf.CodedInputStream input,
  1344. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1345. throws java.io.IOException {
  1346. return newBuilder().mergeFrom(input, extensionRegistry)
  1347. .buildParsed();
  1348. }
  1349. public static Builder newBuilder() { return Builder.create(); }
  1350. public Builder newBuilderForType() { return newBuilder(); }
  1351. public static Builder newBuilder(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList prototype) {
  1352. return newBuilder().mergeFrom(prototype);
  1353. }
  1354. public Builder toBuilder() { return newBuilder(this); }
  1355. @java.lang.Override
  1356. protected Builder newBuilderForType(
  1357. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  1358. Builder builder = new Builder(parent);
  1359. return builder;
  1360. }
  1361. public static final class Builder extends
  1362. com.google.protobuf.GeneratedMessage.Builder<Builder>
  1363. implements org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoListOrBuilder {
  1364. public static final com.google.protobuf.Descriptors.Descriptor
  1365. getDescriptor() {
  1366. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_descriptor;
  1367. }
  1368. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1369. internalGetFieldAccessorTable() {
  1370. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_fieldAccessorTable;
  1371. }
  1372. // Construct using org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList.newBuilder()
  1373. private Builder() {
  1374. maybeForceBuilderInitialization();
  1375. }
  1376. private Builder(BuilderParent parent) {
  1377. super(parent);
  1378. maybeForceBuilderInitialization();
  1379. }
  1380. private void maybeForceBuilderInitialization() {
  1381. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  1382. getPackFieldBuilder();
  1383. }
  1384. }
  1385. private static Builder create() {
  1386. return new Builder();
  1387. }
  1388. public Builder clear() {
  1389. super.clear();
  1390. if (packBuilder_ == null) {
  1391. pack_ = java.util.Collections.emptyList();
  1392. bitField0_ = (bitField0_ & ~0x00000001);
  1393. } else {
  1394. packBuilder_.clear();
  1395. }
  1396. return this;
  1397. }
  1398. public Builder clone() {
  1399. return create().mergeFrom(buildPartial());
  1400. }
  1401. public com.google.protobuf.Descriptors.Descriptor
  1402. getDescriptorForType() {
  1403. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList.getDescriptor();
  1404. }
  1405. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList getDefaultInstanceForType() {
  1406. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList.getDefaultInstance();
  1407. }
  1408. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList build() {
  1409. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList result = buildPartial();
  1410. if (!result.isInitialized()) {
  1411. throw newUninitializedMessageException(result);
  1412. }
  1413. return result;
  1414. }
  1415. private org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList buildParsed()
  1416. throws com.google.protobuf.InvalidProtocolBufferException {
  1417. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList result = buildPartial();
  1418. if (!result.isInitialized()) {
  1419. throw newUninitializedMessageException(
  1420. result).asInvalidProtocolBufferException();
  1421. }
  1422. return result;
  1423. }
  1424. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList buildPartial() {
  1425. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList result = new org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList(this);
  1426. int from_bitField0_ = bitField0_;
  1427. if (packBuilder_ == null) {
  1428. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  1429. pack_ = java.util.Collections.unmodifiableList(pack_);
  1430. bitField0_ = (bitField0_ & ~0x00000001);
  1431. }
  1432. result.pack_ = pack_;
  1433. } else {
  1434. result.pack_ = packBuilder_.build();
  1435. }
  1436. onBuilt();
  1437. return result;
  1438. }
  1439. public Builder mergeFrom(com.google.protobuf.Message other) {
  1440. if (other instanceof org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList) {
  1441. return mergeFrom((org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList)other);
  1442. } else {
  1443. super.mergeFrom(other);
  1444. return this;
  1445. }
  1446. }
  1447. public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList other) {
  1448. if (other == org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList.getDefaultInstance()) return this;
  1449. if (packBuilder_ == null) {
  1450. if (!other.pack_.isEmpty()) {
  1451. if (pack_.isEmpty()) {
  1452. pack_ = other.pack_;
  1453. bitField0_ = (bitField0_ & ~0x00000001);
  1454. } else {
  1455. ensurePackIsMutable();
  1456. pack_.addAll(other.pack_);
  1457. }
  1458. onChanged();
  1459. }
  1460. } else {
  1461. if (!other.pack_.isEmpty()) {
  1462. if (packBuilder_.isEmpty()) {
  1463. packBuilder_.dispose();
  1464. packBuilder_ = null;
  1465. pack_ = other.pack_;
  1466. bitField0_ = (bitField0_ & ~0x00000001);
  1467. packBuilder_ =
  1468. com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
  1469. getPackFieldBuilder() : null;
  1470. } else {
  1471. packBuilder_.addAllMessages(other.pack_);
  1472. }
  1473. }
  1474. }
  1475. this.mergeUnknownFields(other.getUnknownFields());
  1476. return this;
  1477. }
  1478. public final boolean isInitialized() {
  1479. for (int i = 0; i < getPackCount(); i++) {
  1480. if (!getPack(i).isInitialized()) {
  1481. return false;
  1482. }
  1483. }
  1484. return true;
  1485. }
  1486. public Builder mergeFrom(
  1487. com.google.protobuf.CodedInputStream input,
  1488. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1489. throws java.io.IOException {
  1490. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1491. com.google.protobuf.UnknownFieldSet.newBuilder(
  1492. this.getUnknownFields());
  1493. while (true) {
  1494. int tag = input.readTag();
  1495. switch (tag) {
  1496. case 0:
  1497. this.setUnknownFields(unknownFields.build());
  1498. onChanged();
  1499. return this;
  1500. default: {
  1501. if (!parseUnknownField(input, unknownFields,
  1502. extensionRegistry, tag)) {
  1503. this.setUnknownFields(unknownFields.build());
  1504. onChanged();
  1505. return this;
  1506. }
  1507. break;
  1508. }
  1509. case 10: {
  1510. org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder subBuilder = org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.newBuilder();
  1511. input.readMessage(subBuilder, extensionRegistry);
  1512. addPack(subBuilder.buildPartial());
  1513. break;
  1514. }
  1515. }
  1516. }
  1517. }
  1518. private int bitField0_;
  1519. // repeated .org.eclipse.jgit.storage.dht.CachedPackInfo pack = 1;
  1520. private java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo> pack_ =
  1521. java.util.Collections.emptyList();
  1522. private void ensurePackIsMutable() {
  1523. if (!((bitField0_ & 0x00000001) == 0x00000001)) {
  1524. pack_ = new java.util.ArrayList<org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo>(pack_);
  1525. bitField0_ |= 0x00000001;
  1526. }
  1527. }
  1528. private com.google.protobuf.RepeatedFieldBuilder<
  1529. org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder> packBuilder_;
  1530. public java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo> getPackList() {
  1531. if (packBuilder_ == null) {
  1532. return java.util.Collections.unmodifiableList(pack_);
  1533. } else {
  1534. return packBuilder_.getMessageList();
  1535. }
  1536. }
  1537. public int getPackCount() {
  1538. if (packBuilder_ == null) {
  1539. return pack_.size();
  1540. } else {
  1541. return packBuilder_.getCount();
  1542. }
  1543. }
  1544. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo getPack(int index) {
  1545. if (packBuilder_ == null) {
  1546. return pack_.get(index);
  1547. } else {
  1548. return packBuilder_.getMessage(index);
  1549. }
  1550. }
  1551. public Builder setPack(
  1552. int index, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo value) {
  1553. if (packBuilder_ == null) {
  1554. if (value == null) {
  1555. throw new NullPointerException();
  1556. }
  1557. ensurePackIsMutable();
  1558. pack_.set(index, value);
  1559. onChanged();
  1560. } else {
  1561. packBuilder_.setMessage(index, value);
  1562. }
  1563. return this;
  1564. }
  1565. public Builder setPack(
  1566. int index, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder builderForValue) {
  1567. if (packBuilder_ == null) {
  1568. ensurePackIsMutable();
  1569. pack_.set(index, builderForValue.build());
  1570. onChanged();
  1571. } else {
  1572. packBuilder_.setMessage(index, builderForValue.build());
  1573. }
  1574. return this;
  1575. }
  1576. public Builder addPack(org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo value) {
  1577. if (packBuilder_ == null) {
  1578. if (value == null) {
  1579. throw new NullPointerException();
  1580. }
  1581. ensurePackIsMutable();
  1582. pack_.add(value);
  1583. onChanged();
  1584. } else {
  1585. packBuilder_.addMessage(value);
  1586. }
  1587. return this;
  1588. }
  1589. public Builder addPack(
  1590. int index, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo value) {
  1591. if (packBuilder_ == null) {
  1592. if (value == null) {
  1593. throw new NullPointerException();
  1594. }
  1595. ensurePackIsMutable();
  1596. pack_.add(index, value);
  1597. onChanged();
  1598. } else {
  1599. packBuilder_.addMessage(index, value);
  1600. }
  1601. return this;
  1602. }
  1603. public Builder addPack(
  1604. org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder builderForValue) {
  1605. if (packBuilder_ == null) {
  1606. ensurePackIsMutable();
  1607. pack_.add(builderForValue.build());
  1608. onChanged();
  1609. } else {
  1610. packBuilder_.addMessage(builderForValue.build());
  1611. }
  1612. return this;
  1613. }
  1614. public Builder addPack(
  1615. int index, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder builderForValue) {
  1616. if (packBuilder_ == null) {
  1617. ensurePackIsMutable();
  1618. pack_.add(index, builderForValue.build());
  1619. onChanged();
  1620. } else {
  1621. packBuilder_.addMessage(index, builderForValue.build());
  1622. }
  1623. return this;
  1624. }
  1625. public Builder addAllPack(
  1626. java.lang.Iterable<? extends org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo> values) {
  1627. if (packBuilder_ == null) {
  1628. ensurePackIsMutable();
  1629. super.addAll(values, pack_);
  1630. onChanged();
  1631. } else {
  1632. packBuilder_.addAllMessages(values);
  1633. }
  1634. return this;
  1635. }
  1636. public Builder clearPack() {
  1637. if (packBuilder_ == null) {
  1638. pack_ = java.util.Collections.emptyList();
  1639. bitField0_ = (bitField0_ & ~0x00000001);
  1640. onChanged();
  1641. } else {
  1642. packBuilder_.clear();
  1643. }
  1644. return this;
  1645. }
  1646. public Builder removePack(int index) {
  1647. if (packBuilder_ == null) {
  1648. ensurePackIsMutable();
  1649. pack_.remove(index);
  1650. onChanged();
  1651. } else {
  1652. packBuilder_.remove(index);
  1653. }
  1654. return this;
  1655. }
  1656. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder getPackBuilder(
  1657. int index) {
  1658. return getPackFieldBuilder().getBuilder(index);
  1659. }
  1660. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder getPackOrBuilder(
  1661. int index) {
  1662. if (packBuilder_ == null) {
  1663. return pack_.get(index); } else {
  1664. return packBuilder_.getMessageOrBuilder(index);
  1665. }
  1666. }
  1667. public java.util.List<? extends org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder>
  1668. getPackOrBuilderList() {
  1669. if (packBuilder_ != null) {
  1670. return packBuilder_.getMessageOrBuilderList();
  1671. } else {
  1672. return java.util.Collections.unmodifiableList(pack_);
  1673. }
  1674. }
  1675. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder addPackBuilder() {
  1676. return getPackFieldBuilder().addBuilder(
  1677. org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.getDefaultInstance());
  1678. }
  1679. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder addPackBuilder(
  1680. int index) {
  1681. return getPackFieldBuilder().addBuilder(
  1682. index, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.getDefaultInstance());
  1683. }
  1684. public java.util.List<org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder>
  1685. getPackBuilderList() {
  1686. return getPackFieldBuilder().getBuilderList();
  1687. }
  1688. private com.google.protobuf.RepeatedFieldBuilder<
  1689. org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder>
  1690. getPackFieldBuilder() {
  1691. if (packBuilder_ == null) {
  1692. packBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
  1693. org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfo.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.CachedPackInfoOrBuilder>(
  1694. pack_,
  1695. ((bitField0_ & 0x00000001) == 0x00000001),
  1696. getParentForChildren(),
  1697. isClean());
  1698. pack_ = null;
  1699. }
  1700. return packBuilder_;
  1701. }
  1702. // @@protoc_insertion_point(builder_scope:org.eclipse.jgit.storage.dht.CachedPackInfoList)
  1703. }
  1704. static {
  1705. defaultInstance = new CachedPackInfoList(true);
  1706. defaultInstance.initFields();
  1707. }
  1708. // @@protoc_insertion_point(class_scope:org.eclipse.jgit.storage.dht.CachedPackInfoList)
  1709. }
  1710. public interface CachedChunkOrBuilder
  1711. extends com.google.protobuf.MessageOrBuilder {
  1712. // required bytes data = 1;
  1713. boolean hasData();
  1714. com.google.protobuf.ByteString getData();
  1715. // optional bytes index = 2;
  1716. boolean hasIndex();
  1717. com.google.protobuf.ByteString getIndex();
  1718. // optional .org.eclipse.jgit.storage.dht.ChunkMeta meta = 3;
  1719. boolean hasMeta();
  1720. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta getMeta();
  1721. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMetaOrBuilder getMetaOrBuilder();
  1722. }
  1723. public static final class CachedChunk extends
  1724. com.google.protobuf.GeneratedMessage
  1725. implements CachedChunkOrBuilder {
  1726. // Use CachedChunk.newBuilder() to construct.
  1727. private CachedChunk(Builder builder) {
  1728. super(builder);
  1729. }
  1730. private CachedChunk(boolean noInit) {}
  1731. private static final CachedChunk defaultInstance;
  1732. public static CachedChunk getDefaultInstance() {
  1733. return defaultInstance;
  1734. }
  1735. public CachedChunk getDefaultInstanceForType() {
  1736. return defaultInstance;
  1737. }
  1738. public static final com.google.protobuf.Descriptors.Descriptor
  1739. getDescriptor() {
  1740. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedChunk_descriptor;
  1741. }
  1742. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1743. internalGetFieldAccessorTable() {
  1744. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedChunk_fieldAccessorTable;
  1745. }
  1746. private int bitField0_;
  1747. // required bytes data = 1;
  1748. public static final int DATA_FIELD_NUMBER = 1;
  1749. private com.google.protobuf.ByteString data_;
  1750. public boolean hasData() {
  1751. return ((bitField0_ & 0x00000001) == 0x00000001);
  1752. }
  1753. public com.google.protobuf.ByteString getData() {
  1754. return data_;
  1755. }
  1756. // optional bytes index = 2;
  1757. public static final int INDEX_FIELD_NUMBER = 2;
  1758. private com.google.protobuf.ByteString index_;
  1759. public boolean hasIndex() {
  1760. return ((bitField0_ & 0x00000002) == 0x00000002);
  1761. }
  1762. public com.google.protobuf.ByteString getIndex() {
  1763. return index_;
  1764. }
  1765. // optional .org.eclipse.jgit.storage.dht.ChunkMeta meta = 3;
  1766. public static final int META_FIELD_NUMBER = 3;
  1767. private org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta meta_;
  1768. public boolean hasMeta() {
  1769. return ((bitField0_ & 0x00000004) == 0x00000004);
  1770. }
  1771. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta getMeta() {
  1772. return meta_;
  1773. }
  1774. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMetaOrBuilder getMetaOrBuilder() {
  1775. return meta_;
  1776. }
  1777. private void initFields() {
  1778. data_ = com.google.protobuf.ByteString.EMPTY;
  1779. index_ = com.google.protobuf.ByteString.EMPTY;
  1780. meta_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.getDefaultInstance();
  1781. }
  1782. private byte memoizedIsInitialized = -1;
  1783. public final boolean isInitialized() {
  1784. byte isInitialized = memoizedIsInitialized;
  1785. if (isInitialized != -1) return isInitialized == 1;
  1786. if (!hasData()) {
  1787. memoizedIsInitialized = 0;
  1788. return false;
  1789. }
  1790. if (hasMeta()) {
  1791. if (!getMeta().isInitialized()) {
  1792. memoizedIsInitialized = 0;
  1793. return false;
  1794. }
  1795. }
  1796. memoizedIsInitialized = 1;
  1797. return true;
  1798. }
  1799. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1800. throws java.io.IOException {
  1801. getSerializedSize();
  1802. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  1803. output.writeBytes(1, data_);
  1804. }
  1805. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  1806. output.writeBytes(2, index_);
  1807. }
  1808. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  1809. output.writeMessage(3, meta_);
  1810. }
  1811. getUnknownFields().writeTo(output);
  1812. }
  1813. private int memoizedSerializedSize = -1;
  1814. public int getSerializedSize() {
  1815. int size = memoizedSerializedSize;
  1816. if (size != -1) return size;
  1817. size = 0;
  1818. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  1819. size += com.google.protobuf.CodedOutputStream
  1820. .computeBytesSize(1, data_);
  1821. }
  1822. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  1823. size += com.google.protobuf.CodedOutputStream
  1824. .computeBytesSize(2, index_);
  1825. }
  1826. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  1827. size += com.google.protobuf.CodedOutputStream
  1828. .computeMessageSize(3, meta_);
  1829. }
  1830. size += getUnknownFields().getSerializedSize();
  1831. memoizedSerializedSize = size;
  1832. return size;
  1833. }
  1834. @java.lang.Override
  1835. protected Object writeReplace() throws java.io.ObjectStreamException {
  1836. return super.writeReplace();
  1837. }
  1838. @java.lang.Override
  1839. public boolean equals(final Object obj) {
  1840. if (obj == this) {
  1841. return true;
  1842. }
  1843. if (!(obj instanceof org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk)) {
  1844. return super.equals(obj);
  1845. }
  1846. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk other = (org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk) obj;
  1847. boolean result = true;
  1848. result = result && (hasData() == other.hasData());
  1849. if (hasData()) {
  1850. result = result && getData()
  1851. .equals(other.getData());
  1852. }
  1853. result = result && (hasIndex() == other.hasIndex());
  1854. if (hasIndex()) {
  1855. result = result && getIndex()
  1856. .equals(other.getIndex());
  1857. }
  1858. result = result && (hasMeta() == other.hasMeta());
  1859. if (hasMeta()) {
  1860. result = result && getMeta()
  1861. .equals(other.getMeta());
  1862. }
  1863. result = result &&
  1864. getUnknownFields().equals(other.getUnknownFields());
  1865. return result;
  1866. }
  1867. @java.lang.Override
  1868. public int hashCode() {
  1869. int hash = 41;
  1870. hash = (19 * hash) + getDescriptorForType().hashCode();
  1871. if (hasData()) {
  1872. hash = (37 * hash) + DATA_FIELD_NUMBER;
  1873. hash = (53 * hash) + getData().hashCode();
  1874. }
  1875. if (hasIndex()) {
  1876. hash = (37 * hash) + INDEX_FIELD_NUMBER;
  1877. hash = (53 * hash) + getIndex().hashCode();
  1878. }
  1879. if (hasMeta()) {
  1880. hash = (37 * hash) + META_FIELD_NUMBER;
  1881. hash = (53 * hash) + getMeta().hashCode();
  1882. }
  1883. hash = (29 * hash) + getUnknownFields().hashCode();
  1884. return hash;
  1885. }
  1886. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseFrom(
  1887. com.google.protobuf.ByteString data)
  1888. throws com.google.protobuf.InvalidProtocolBufferException {
  1889. return newBuilder().mergeFrom(data).buildParsed();
  1890. }
  1891. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseFrom(
  1892. com.google.protobuf.ByteString data,
  1893. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1894. throws com.google.protobuf.InvalidProtocolBufferException {
  1895. return newBuilder().mergeFrom(data, extensionRegistry)
  1896. .buildParsed();
  1897. }
  1898. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseFrom(byte[] data)
  1899. throws com.google.protobuf.InvalidProtocolBufferException {
  1900. return newBuilder().mergeFrom(data).buildParsed();
  1901. }
  1902. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseFrom(
  1903. byte[] data,
  1904. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1905. throws com.google.protobuf.InvalidProtocolBufferException {
  1906. return newBuilder().mergeFrom(data, extensionRegistry)
  1907. .buildParsed();
  1908. }
  1909. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseFrom(java.io.InputStream input)
  1910. throws java.io.IOException {
  1911. return newBuilder().mergeFrom(input).buildParsed();
  1912. }
  1913. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseFrom(
  1914. java.io.InputStream input,
  1915. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1916. throws java.io.IOException {
  1917. return newBuilder().mergeFrom(input, extensionRegistry)
  1918. .buildParsed();
  1919. }
  1920. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseDelimitedFrom(java.io.InputStream input)
  1921. throws java.io.IOException {
  1922. Builder builder = newBuilder();
  1923. if (builder.mergeDelimitedFrom(input)) {
  1924. return builder.buildParsed();
  1925. } else {
  1926. return null;
  1927. }
  1928. }
  1929. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseDelimitedFrom(
  1930. java.io.InputStream input,
  1931. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1932. throws java.io.IOException {
  1933. Builder builder = newBuilder();
  1934. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1935. return builder.buildParsed();
  1936. } else {
  1937. return null;
  1938. }
  1939. }
  1940. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseFrom(
  1941. com.google.protobuf.CodedInputStream input)
  1942. throws java.io.IOException {
  1943. return newBuilder().mergeFrom(input).buildParsed();
  1944. }
  1945. public static org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk parseFrom(
  1946. com.google.protobuf.CodedInputStream input,
  1947. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1948. throws java.io.IOException {
  1949. return newBuilder().mergeFrom(input, extensionRegistry)
  1950. .buildParsed();
  1951. }
  1952. public static Builder newBuilder() { return Builder.create(); }
  1953. public Builder newBuilderForType() { return newBuilder(); }
  1954. public static Builder newBuilder(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk prototype) {
  1955. return newBuilder().mergeFrom(prototype);
  1956. }
  1957. public Builder toBuilder() { return newBuilder(this); }
  1958. @java.lang.Override
  1959. protected Builder newBuilderForType(
  1960. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  1961. Builder builder = new Builder(parent);
  1962. return builder;
  1963. }
  1964. public static final class Builder extends
  1965. com.google.protobuf.GeneratedMessage.Builder<Builder>
  1966. implements org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunkOrBuilder {
  1967. public static final com.google.protobuf.Descriptors.Descriptor
  1968. getDescriptor() {
  1969. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedChunk_descriptor;
  1970. }
  1971. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1972. internalGetFieldAccessorTable() {
  1973. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.internal_static_org_eclipse_jgit_storage_dht_CachedChunk_fieldAccessorTable;
  1974. }
  1975. // Construct using org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk.newBuilder()
  1976. private Builder() {
  1977. maybeForceBuilderInitialization();
  1978. }
  1979. private Builder(BuilderParent parent) {
  1980. super(parent);
  1981. maybeForceBuilderInitialization();
  1982. }
  1983. private void maybeForceBuilderInitialization() {
  1984. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  1985. getMetaFieldBuilder();
  1986. }
  1987. }
  1988. private static Builder create() {
  1989. return new Builder();
  1990. }
  1991. public Builder clear() {
  1992. super.clear();
  1993. data_ = com.google.protobuf.ByteString.EMPTY;
  1994. bitField0_ = (bitField0_ & ~0x00000001);
  1995. index_ = com.google.protobuf.ByteString.EMPTY;
  1996. bitField0_ = (bitField0_ & ~0x00000002);
  1997. if (metaBuilder_ == null) {
  1998. meta_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.getDefaultInstance();
  1999. } else {
  2000. metaBuilder_.clear();
  2001. }
  2002. bitField0_ = (bitField0_ & ~0x00000004);
  2003. return this;
  2004. }
  2005. public Builder clone() {
  2006. return create().mergeFrom(buildPartial());
  2007. }
  2008. public com.google.protobuf.Descriptors.Descriptor
  2009. getDescriptorForType() {
  2010. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk.getDescriptor();
  2011. }
  2012. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk getDefaultInstanceForType() {
  2013. return org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk.getDefaultInstance();
  2014. }
  2015. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk build() {
  2016. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk result = buildPartial();
  2017. if (!result.isInitialized()) {
  2018. throw newUninitializedMessageException(result);
  2019. }
  2020. return result;
  2021. }
  2022. private org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk buildParsed()
  2023. throws com.google.protobuf.InvalidProtocolBufferException {
  2024. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk result = buildPartial();
  2025. if (!result.isInitialized()) {
  2026. throw newUninitializedMessageException(
  2027. result).asInvalidProtocolBufferException();
  2028. }
  2029. return result;
  2030. }
  2031. public org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk buildPartial() {
  2032. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk result = new org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk(this);
  2033. int from_bitField0_ = bitField0_;
  2034. int to_bitField0_ = 0;
  2035. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  2036. to_bitField0_ |= 0x00000001;
  2037. }
  2038. result.data_ = data_;
  2039. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  2040. to_bitField0_ |= 0x00000002;
  2041. }
  2042. result.index_ = index_;
  2043. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  2044. to_bitField0_ |= 0x00000004;
  2045. }
  2046. if (metaBuilder_ == null) {
  2047. result.meta_ = meta_;
  2048. } else {
  2049. result.meta_ = metaBuilder_.build();
  2050. }
  2051. result.bitField0_ = to_bitField0_;
  2052. onBuilt();
  2053. return result;
  2054. }
  2055. public Builder mergeFrom(com.google.protobuf.Message other) {
  2056. if (other instanceof org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk) {
  2057. return mergeFrom((org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk)other);
  2058. } else {
  2059. super.mergeFrom(other);
  2060. return this;
  2061. }
  2062. }
  2063. public Builder mergeFrom(org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk other) {
  2064. if (other == org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk.getDefaultInstance()) return this;
  2065. if (other.hasData()) {
  2066. setData(other.getData());
  2067. }
  2068. if (other.hasIndex()) {
  2069. setIndex(other.getIndex());
  2070. }
  2071. if (other.hasMeta()) {
  2072. mergeMeta(other.getMeta());
  2073. }
  2074. this.mergeUnknownFields(other.getUnknownFields());
  2075. return this;
  2076. }
  2077. public final boolean isInitialized() {
  2078. if (!hasData()) {
  2079. return false;
  2080. }
  2081. if (hasMeta()) {
  2082. if (!getMeta().isInitialized()) {
  2083. return false;
  2084. }
  2085. }
  2086. return true;
  2087. }
  2088. public Builder mergeFrom(
  2089. com.google.protobuf.CodedInputStream input,
  2090. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2091. throws java.io.IOException {
  2092. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  2093. com.google.protobuf.UnknownFieldSet.newBuilder(
  2094. this.getUnknownFields());
  2095. while (true) {
  2096. int tag = input.readTag();
  2097. switch (tag) {
  2098. case 0:
  2099. this.setUnknownFields(unknownFields.build());
  2100. onChanged();
  2101. return this;
  2102. default: {
  2103. if (!parseUnknownField(input, unknownFields,
  2104. extensionRegistry, tag)) {
  2105. this.setUnknownFields(unknownFields.build());
  2106. onChanged();
  2107. return this;
  2108. }
  2109. break;
  2110. }
  2111. case 10: {
  2112. bitField0_ |= 0x00000001;
  2113. data_ = input.readBytes();
  2114. break;
  2115. }
  2116. case 18: {
  2117. bitField0_ |= 0x00000002;
  2118. index_ = input.readBytes();
  2119. break;
  2120. }
  2121. case 26: {
  2122. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.Builder subBuilder = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.newBuilder();
  2123. if (hasMeta()) {
  2124. subBuilder.mergeFrom(getMeta());
  2125. }
  2126. input.readMessage(subBuilder, extensionRegistry);
  2127. setMeta(subBuilder.buildPartial());
  2128. break;
  2129. }
  2130. }
  2131. }
  2132. }
  2133. private int bitField0_;
  2134. // required bytes data = 1;
  2135. private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
  2136. public boolean hasData() {
  2137. return ((bitField0_ & 0x00000001) == 0x00000001);
  2138. }
  2139. public com.google.protobuf.ByteString getData() {
  2140. return data_;
  2141. }
  2142. public Builder setData(com.google.protobuf.ByteString value) {
  2143. if (value == null) {
  2144. throw new NullPointerException();
  2145. }
  2146. bitField0_ |= 0x00000001;
  2147. data_ = value;
  2148. onChanged();
  2149. return this;
  2150. }
  2151. public Builder clearData() {
  2152. bitField0_ = (bitField0_ & ~0x00000001);
  2153. data_ = getDefaultInstance().getData();
  2154. onChanged();
  2155. return this;
  2156. }
  2157. // optional bytes index = 2;
  2158. private com.google.protobuf.ByteString index_ = com.google.protobuf.ByteString.EMPTY;
  2159. public boolean hasIndex() {
  2160. return ((bitField0_ & 0x00000002) == 0x00000002);
  2161. }
  2162. public com.google.protobuf.ByteString getIndex() {
  2163. return index_;
  2164. }
  2165. public Builder setIndex(com.google.protobuf.ByteString value) {
  2166. if (value == null) {
  2167. throw new NullPointerException();
  2168. }
  2169. bitField0_ |= 0x00000002;
  2170. index_ = value;
  2171. onChanged();
  2172. return this;
  2173. }
  2174. public Builder clearIndex() {
  2175. bitField0_ = (bitField0_ & ~0x00000002);
  2176. index_ = getDefaultInstance().getIndex();
  2177. onChanged();
  2178. return this;
  2179. }
  2180. // optional .org.eclipse.jgit.storage.dht.ChunkMeta meta = 3;
  2181. private org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta meta_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.getDefaultInstance();
  2182. private com.google.protobuf.SingleFieldBuilder<
  2183. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMetaOrBuilder> metaBuilder_;
  2184. public boolean hasMeta() {
  2185. return ((bitField0_ & 0x00000004) == 0x00000004);
  2186. }
  2187. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta getMeta() {
  2188. if (metaBuilder_ == null) {
  2189. return meta_;
  2190. } else {
  2191. return metaBuilder_.getMessage();
  2192. }
  2193. }
  2194. public Builder setMeta(org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta value) {
  2195. if (metaBuilder_ == null) {
  2196. if (value == null) {
  2197. throw new NullPointerException();
  2198. }
  2199. meta_ = value;
  2200. onChanged();
  2201. } else {
  2202. metaBuilder_.setMessage(value);
  2203. }
  2204. bitField0_ |= 0x00000004;
  2205. return this;
  2206. }
  2207. public Builder setMeta(
  2208. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.Builder builderForValue) {
  2209. if (metaBuilder_ == null) {
  2210. meta_ = builderForValue.build();
  2211. onChanged();
  2212. } else {
  2213. metaBuilder_.setMessage(builderForValue.build());
  2214. }
  2215. bitField0_ |= 0x00000004;
  2216. return this;
  2217. }
  2218. public Builder mergeMeta(org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta value) {
  2219. if (metaBuilder_ == null) {
  2220. if (((bitField0_ & 0x00000004) == 0x00000004) &&
  2221. meta_ != org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.getDefaultInstance()) {
  2222. meta_ =
  2223. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.newBuilder(meta_).mergeFrom(value).buildPartial();
  2224. } else {
  2225. meta_ = value;
  2226. }
  2227. onChanged();
  2228. } else {
  2229. metaBuilder_.mergeFrom(value);
  2230. }
  2231. bitField0_ |= 0x00000004;
  2232. return this;
  2233. }
  2234. public Builder clearMeta() {
  2235. if (metaBuilder_ == null) {
  2236. meta_ = org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.getDefaultInstance();
  2237. onChanged();
  2238. } else {
  2239. metaBuilder_.clear();
  2240. }
  2241. bitField0_ = (bitField0_ & ~0x00000004);
  2242. return this;
  2243. }
  2244. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.Builder getMetaBuilder() {
  2245. bitField0_ |= 0x00000004;
  2246. onChanged();
  2247. return getMetaFieldBuilder().getBuilder();
  2248. }
  2249. public org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMetaOrBuilder getMetaOrBuilder() {
  2250. if (metaBuilder_ != null) {
  2251. return metaBuilder_.getMessageOrBuilder();
  2252. } else {
  2253. return meta_;
  2254. }
  2255. }
  2256. private com.google.protobuf.SingleFieldBuilder<
  2257. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMetaOrBuilder>
  2258. getMetaFieldBuilder() {
  2259. if (metaBuilder_ == null) {
  2260. metaBuilder_ = new com.google.protobuf.SingleFieldBuilder<
  2261. org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMeta.Builder, org.eclipse.jgit.generated.storage.dht.proto.GitStore.ChunkMetaOrBuilder>(
  2262. meta_,
  2263. getParentForChildren(),
  2264. isClean());
  2265. meta_ = null;
  2266. }
  2267. return metaBuilder_;
  2268. }
  2269. // @@protoc_insertion_point(builder_scope:org.eclipse.jgit.storage.dht.CachedChunk)
  2270. }
  2271. static {
  2272. defaultInstance = new CachedChunk(true);
  2273. defaultInstance.initFields();
  2274. }
  2275. // @@protoc_insertion_point(class_scope:org.eclipse.jgit.storage.dht.CachedChunk)
  2276. }
  2277. private static com.google.protobuf.Descriptors.Descriptor
  2278. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_descriptor;
  2279. private static
  2280. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2281. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_fieldAccessorTable;
  2282. private static com.google.protobuf.Descriptors.Descriptor
  2283. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_descriptor;
  2284. private static
  2285. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2286. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_fieldAccessorTable;
  2287. private static com.google.protobuf.Descriptors.Descriptor
  2288. internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_descriptor;
  2289. private static
  2290. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2291. internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_fieldAccessorTable;
  2292. private static com.google.protobuf.Descriptors.Descriptor
  2293. internal_static_org_eclipse_jgit_storage_dht_CachedChunk_descriptor;
  2294. private static
  2295. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2296. internal_static_org_eclipse_jgit_storage_dht_CachedChunk_fieldAccessorTable;
  2297. public static com.google.protobuf.Descriptors.FileDescriptor
  2298. getDescriptor() {
  2299. return descriptor;
  2300. }
  2301. private static com.google.protobuf.Descriptors.FileDescriptor
  2302. descriptor;
  2303. static {
  2304. java.lang.String[] descriptorData = {
  2305. "\n,org/eclipse/jgit/storage/dht/git_cache" +
  2306. ".proto\022\034org.eclipse.jgit.storage.dht\032,or" +
  2307. "g/eclipse/jgit/storage/dht/git_store.pro" +
  2308. "to\"\277\001\n\021CachedObjectIndex\022B\n\004item\030\001 \003(\01324" +
  2309. ".org.eclipse.jgit.storage.dht.CachedObje" +
  2310. "ctIndex.Item\032f\n\004Item\022\021\n\tchunk_key\030\001 \002(\t\022" +
  2311. "=\n\013object_info\030\002 \002(\0132(.org.eclipse.jgit." +
  2312. "storage.dht.ObjectInfo\022\014\n\004time\030\003 \001(\006\"P\n\022" +
  2313. "CachedPackInfoList\022:\n\004pack\030\001 \003(\0132,.org.e" +
  2314. "clipse.jgit.storage.dht.CachedPackInfo\"a",
  2315. "\n\013CachedChunk\022\014\n\004data\030\001 \002(\014\022\r\n\005index\030\002 \001" +
  2316. "(\014\0225\n\004meta\030\003 \001(\0132\'.org.eclipse.jgit.stor" +
  2317. "age.dht.ChunkMetaB1\n,org.eclipse.jgit.ge" +
  2318. "nerated.storage.dht.proto\240\001\001"
  2319. };
  2320. com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
  2321. new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
  2322. public com.google.protobuf.ExtensionRegistry assignDescriptors(
  2323. com.google.protobuf.Descriptors.FileDescriptor root) {
  2324. descriptor = root;
  2325. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_descriptor =
  2326. getDescriptor().getMessageTypes().get(0);
  2327. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_fieldAccessorTable = new
  2328. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2329. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_descriptor,
  2330. new java.lang.String[] { "Item", },
  2331. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.class,
  2332. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Builder.class);
  2333. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_descriptor =
  2334. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_descriptor.getNestedTypes().get(0);
  2335. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_fieldAccessorTable = new
  2336. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2337. internal_static_org_eclipse_jgit_storage_dht_CachedObjectIndex_Item_descriptor,
  2338. new java.lang.String[] { "ChunkKey", "ObjectInfo", "Time", },
  2339. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.class,
  2340. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedObjectIndex.Item.Builder.class);
  2341. internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_descriptor =
  2342. getDescriptor().getMessageTypes().get(1);
  2343. internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_fieldAccessorTable = new
  2344. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2345. internal_static_org_eclipse_jgit_storage_dht_CachedPackInfoList_descriptor,
  2346. new java.lang.String[] { "Pack", },
  2347. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList.class,
  2348. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedPackInfoList.Builder.class);
  2349. internal_static_org_eclipse_jgit_storage_dht_CachedChunk_descriptor =
  2350. getDescriptor().getMessageTypes().get(2);
  2351. internal_static_org_eclipse_jgit_storage_dht_CachedChunk_fieldAccessorTable = new
  2352. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2353. internal_static_org_eclipse_jgit_storage_dht_CachedChunk_descriptor,
  2354. new java.lang.String[] { "Data", "Index", "Meta", },
  2355. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk.class,
  2356. org.eclipse.jgit.generated.storage.dht.proto.GitCache.CachedChunk.Builder.class);
  2357. return null;
  2358. }
  2359. };
  2360. com.google.protobuf.Descriptors.FileDescriptor
  2361. .internalBuildGeneratedFileFrom(descriptorData,
  2362. new com.google.protobuf.Descriptors.FileDescriptor[] {
  2363. org.eclipse.jgit.generated.storage.dht.proto.GitStore.getDescriptor(),
  2364. }, assigner);
  2365. }
  2366. // @@protoc_insertion_point(outer_class_scope)
  2367. }