Package io.debezium.connector.informix
Class Lsn
java.lang.Object
io.debezium.connector.informix.Lsn
- All Implemented Interfaces:
io.debezium.connector.Nullable,Comparable<Lsn>
A logical representation of LSN (log sequence number) position. When LSN is not available
it is replaced with
NULL constant.- Author:
- Laoflch Luo, Xiaolin Zhang, Lars M Johansson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintEnables ordering of LSNs.booleaninthashCode()Return the next LSN in sequencebooleanbooleanVerifies whether the LSN falls into a LSN intervallonglogpos()32bit position within the current log pagelongloguniq()32bit log page unique identifierlongReturn the LSN String for an official representation, like "LSN(7:0x8a209c)".toString()static Lsnstatic Lsn
-
Field Details
-
NULL
-
LO_MASK
private static final long LO_MASK -
HI_MASK
private static final long HI_MASK -
lsn
-
-
Constructor Details
-
Lsn
Lsn(Long lsn)
-
-
Method Details
-
valueOf
- Parameters:
lsn- - signed long integer string. We consider "NULL" and "-1L" as same as "new Lsn(-1)".- Returns:
- LSN converted from its textual representation
-
valueOf
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceio.debezium.connector.Nullable- Returns:
- true if this is a real LSN or false it it is
NULL
-
toString
-
toLongString
Return the LSN String for an official representation, like "LSN(7:0x8a209c)". Reference Informix 11.70 CDC API Programmer's Guide page 62 for more details.- Returns:
- official textual representation of LSN.
-
logpos
public long logpos()32bit position within the current log page -
loguniq
public long loguniq()32bit log page unique identifier -
longValue
public long longValue() -
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
-
increment
Return the next LSN in sequence
-