Package io.debezium.connector.oracle
Class Scn
- java.lang.Object
-
- io.debezium.connector.oracle.Scn
-
- All Implemented Interfaces:
Comparable<Scn>
public class Scn extends Object implements Comparable<Scn>
Oracle System Change Number implementation- Author:
- Chris Cranford
-
-
Constructor Summary
Constructors Constructor Description Scn(BigInteger scn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Scnadd(Scn value)Returns aSCnwhose value is(this + value).intcompareTo(Scn o)Compares thisScnwith the specifiedScn.booleanequals(Object o)inthashCode()booleanisNull()Returns whether thisScnis null and contains no value.longlongValue()Get the Scn represented as alongdata type.Scnsubtract(Scn value)Returns aScnwhose value is(this - value).StringtoString()static ScnvalueOf(int value)Construct aScnfrom an integer value.static ScnvalueOf(long value)Construct aScnfrom a long value.static ScnvalueOf(String value)Construct aScnfrom a string value.
-
-
-
Field Detail
-
MAX
public static final Scn MAX
Represents an Scn that implies the maximum possible value of an SCN, useful as a placeholder.
-
NULL
public static final Scn NULL
Represents an Scn without a value.
-
scn
private final BigInteger scn
-
-
Constructor Detail
-
Scn
public Scn(BigInteger scn)
-
-
Method Detail
-
isNull
public boolean isNull()
Returns whether thisScnis null and contains no value.
-
valueOf
public static Scn valueOf(int value)
Construct aScnfrom an integer value.- Parameters:
value- integer value- Returns:
- instance of Scn
-
valueOf
public static Scn valueOf(long value)
Construct aScnfrom a long value.- Parameters:
value- long value- Returns:
- instance of Scn
-
valueOf
public static Scn valueOf(String value)
Construct aScnfrom a string value.- Parameters:
value- string value, should not be null- Returns:
- instance of Scn
-
longValue
public long longValue()
Get the Scn represented as alongdata type.
-
add
public Scn add(Scn value)
Returns aSCnwhose value is(this + value).- Parameters:
value- the value to be added to thisScn.- Returns:
this + value
-
subtract
public Scn subtract(Scn value)
Returns aScnwhose value is(this - value).- Parameters:
value- the value to be subtracted from thisScn.- Returns:
this - value
-
compareTo
public int compareTo(Scn o)
Compares thisScnwith the specifiedScn.- Specified by:
compareToin interfaceComparable<Scn>- Parameters:
o-Scnto which thisScnis to be compared- Returns:
- -1, 0, or 1 as this {code Scn} is numerically less than, equal to, or greater than
o.
-
-