Class CmpTarget<T>

java.lang.Object
io.etcd.jetcd.op.CmpTarget<T>
Direct Known Subclasses:
CmpTarget.CreateRevisionCmpTarget, CmpTarget.ModRevisionCmpTarget, CmpTarget.ValueCmpTarget, CmpTarget.VersionCmpTarget

public abstract class CmpTarget<T> extends Object
Cmp target used in Txn.
  • Constructor Details

    • CmpTarget

      protected CmpTarget(io.etcd.jetcd.api.Compare.CompareTarget target, T targetValue)
  • Method Details

    • version

      public static CmpTarget.VersionCmpTarget version(long version)
      Cmp on a given version.
      Parameters:
      version - version to compare
      Returns:
      the version compare target
    • createRevision

      public static CmpTarget.CreateRevisionCmpTarget createRevision(long revision)
      Cmp on the create revision.
      Parameters:
      revision - the create revision
      Returns:
      the create revision compare target
    • modRevision

      public static CmpTarget.ModRevisionCmpTarget modRevision(long revision)
      Cmp on the modification revision.
      Parameters:
      revision - the modification revision
      Returns:
      the modification revision compare target
    • value

      public static CmpTarget.ValueCmpTarget value(ByteSequence value)
      Cmp on the value.
      Parameters:
      value - the value to compare
      Returns:
      the value compare target
    • getTarget

      public io.etcd.jetcd.api.Compare.CompareTarget getTarget()
      Get the compare target used for this compare.
      Returns:
      the compare target used for this compare
    • getTargetValue

      public T getTargetValue()
      Get the compare target value of this compare.
      Returns:
      the compare target value of this compare.