Class RefLeaseSpec

  • All Implemented Interfaces:
    java.io.Serializable

    public class RefLeaseSpec
    extends java.lang.Object
    implements java.io.Serializable
    Describes the expected value for a ref being pushed.
    Since:
    4.7
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String expected
      Local commitish to get expected value from.
      private java.lang.String ref
      Name of the ref whose value we want to check.
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      RefLeaseSpec​(java.lang.String ref, java.lang.String expected)
      Constructor for RefLeaseSpec.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getExpected()
      Get the expected value of the ref, in the form of a local committish
      java.lang.String getRef()
      Get the ref to protect.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ref

        private final java.lang.String ref
        Name of the ref whose value we want to check.
      • expected

        private final java.lang.String expected
        Local commitish to get expected value from.
    • Constructor Detail

      • RefLeaseSpec

        public RefLeaseSpec​(java.lang.String ref,
                            java.lang.String expected)

        Constructor for RefLeaseSpec.

        Parameters:
        ref - ref being pushed
        expected - the expected value of the ref
    • Method Detail

      • getRef

        public java.lang.String getRef()
        Get the ref to protect.
        Returns:
        name of ref to check.
      • getExpected

        public java.lang.String getExpected()
        Get the expected value of the ref, in the form of a local committish
        Returns:
        expected ref value.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object