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.

NoteBucket.java 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (C) 2010, Google Inc. and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.notes;
  11. import java.io.IOException;
  12. import java.util.Iterator;
  13. import org.eclipse.jgit.lib.AnyObjectId;
  14. import org.eclipse.jgit.lib.ObjectId;
  15. import org.eclipse.jgit.lib.ObjectInserter;
  16. import org.eclipse.jgit.lib.ObjectReader;
  17. /**
  18. * A tree that stores note objects.
  19. *
  20. * @see FanoutBucket
  21. * @see LeafBucket
  22. */
  23. abstract class NoteBucket {
  24. abstract Note getNote(AnyObjectId objId, ObjectReader reader)
  25. throws IOException;
  26. abstract Iterator<Note> iterator(AnyObjectId objId, ObjectReader reader)
  27. throws IOException;
  28. abstract int estimateSize(AnyObjectId noteOn, ObjectReader or)
  29. throws IOException;
  30. abstract InMemoryNoteBucket set(AnyObjectId noteOn, AnyObjectId noteData,
  31. ObjectReader reader) throws IOException;
  32. abstract ObjectId writeTree(ObjectInserter inserter) throws IOException;
  33. abstract ObjectId getTreeId();
  34. }