Package io.debezium.connector.sqlserver
Class Lsn
java.lang.Object
io.debezium.connector.sqlserver.Lsn
- All Implemented Interfaces:
Nullable,Comparable<Lsn>
A logical representation of SQL Server LSN (log sequence number) position. When LSN is not available
it is replaced with
NULL constant.- Author:
- Jiri Pechanec
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NULL_STRING
- See Also:
-
NULL
-
binary
private final byte[] binary -
unsignedBinary
private int[] unsignedBinary -
string
-
-
Constructor Details
-
Lsn
private Lsn(byte[] binary)
-
-
Method Details
-
getBinary
public byte[] getBinary()- Returns:
- binary representation of the stored LSN
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceNullable- Returns:
- true if this is a real LSN or false it it is
NULL
-
getUnsignedBinary
private int[] getUnsignedBinary() -
toString
-
valueOf
- Parameters:
lsnString- - textual representation of Lsn- Returns:
- LSN converted from its textual representation
-
valueOf
- Parameters:
lsnBinary- - binary representation of Lsn- Returns:
- LSN converted from its binary representation
-
hashCode
public int hashCode() -
equals
-
compareTo
Enables ordering of LSNs. TheNULLLSN is always the smallest one.- Specified by:
compareToin interfaceComparable<Lsn>
-
isBetween
Verifies whether the LSN falls into a LSN interval- Parameters:
from- start of the interval (included)to- end of the interval (excluded)- Returns:
- true if the LSN falls into the interval
-