Interface Branch

All Superinterfaces:
Base, Reference

@Immutable public interface Branch extends Reference
API representation of a Nessie Branch. This object is akin to a Ref in Git terminology.
  • Method Details

    • getName

      @Parameter(order=1) String getName()
      Description copied from interface: Reference
      Human-readable reference name.
      Specified by:
      getName in interface Reference
    • getMetadata

      @Nullable @Nullable @Parameter(order=3) ReferenceMetadata getMetadata()
      Description copied from interface: Reference
      Returns a ReferenceMetadata instance that contains additional metadata about this reference. Note that this is only added by the server when explicitly requested by the client.
      Specified by:
      getMetadata in interface Reference
      Returns:
      A ReferenceMetadata instance that contains additional metadata about this reference. Note that this is only added by the server when explicitly requested by the client.
    • getHash

      @Nullable @Nullable @Parameter(order=2) String getHash()
      Description copied from interface: Reference
      Commit ID of the reference.

      Will be an "exact" commit ID (no relative parts) when returned from a Nessie server. Might contain relative parts when used as an input to a Nessie API functionality (since Nessie spec 2.1.0).

      Specified by:
      getHash in interface Reference
    • checkName

      @Check default void checkName()
    • getType

      default Reference.ReferenceType getType()
      Specified by:
      getType in interface Reference
    • builder

      static org.projectnessie.model.ImmutableBranch.Builder builder()
    • of

      static Branch of(String name, @Nullable @Nullable String hash)
    • of

      static Branch of(String name, @Nullable @Nullable String hash, ReferenceMetadata metadata)