Package io.etcd.jetcd.op
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 java.lang.ObjectCmp target used inTxn.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCmpTarget.CreateRevisionCmpTargetstatic classCmpTarget.ModRevisionCmpTargetstatic classCmpTarget.ValueCmpTargetstatic classCmpTarget.VersionCmpTarget
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CmpTarget.CreateRevisionCmpTargetcreateRevision(long revision)Cmp on the create revision.io.etcd.jetcd.api.Compare.CompareTargetgetTarget()Get the compare target used for this compare.TgetTargetValue()Get the compare target value of this compare.static CmpTarget.ModRevisionCmpTargetmodRevision(long revision)Cmp on the modification revision.static CmpTarget.ValueCmpTargetvalue(ByteSequence value)Cmp on the value.static CmpTarget.VersionCmpTargetversion(long version)Cmp on a given version.
-
-
-
Constructor Detail
-
CmpTarget
protected CmpTarget(io.etcd.jetcd.api.Compare.CompareTarget target, T targetValue)
-
-
Method Detail
-
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.
-
-