@API.Public @API.NotThreadSafe public interface ChangeDataReader extends Iterator<ChangeEvent>
ChangeDataRecord.
It provides a cursor-like semantics which can be moved, one node at a time by invoking
next().
The properties of individual change node. For example, data type, field name,
field value, etc. can be retrieved using various methods of this interface.| Modifier and Type | Method and Description |
|---|---|
int |
getArrayIndex() |
ByteBuffer |
getBinary() |
boolean |
getBoolean() |
byte |
getByte() |
ODate |
getDate() |
int |
getDateInt() |
BigDecimal |
getDecimal() |
int |
getDecimalPrecision()
Returns the precision of the current
DECIMAL node. |
int |
getDecimalScale()
Returns the scale of the current
DECIMAL node. |
ByteBuffer |
getDecimalValueAsBytes()
Returns a
ByteBuffer containing the two's complement representation
of the current DECIMAL node. |
int |
getDecimalValueAsInt()
Returns an
int whose value is the unscaled value of this
DECIMAL. |
long |
getDecimalValueAsLong()
Returns a
long whose value is the unscaled value of this
DECIMAL. |
double |
getDouble() |
String |
getFieldName() |
ByteBuffer |
getFieldNameBytes() |
float |
getFloat() |
int |
getInt() |
OInterval |
getInterval() |
long |
getIntervalMillis()
Returns the value of this interval duration in milliseconds computed from
individual fields.
|
long |
getLong() |
ChangeOp |
getOp()
Returns the
ChangeOp of the current change node. |
long |
getOpTimestamp()
Returns the logical time of the data.
|
long |
getServerTimestamp() |
short |
getShort() |
String |
getString() |
OTime |
getTime() |
int |
getTimeInt() |
OTimestamp |
getTimestamp() |
long |
getTimestampLong() |
Value.Type |
getType() |
boolean |
inArray()
If it returns true, the current field is in an array;
otherwise, the current field is not in an array.
|
boolean |
inMap()
If it returns true, the current field is in a map;
otherwise, the current field is not in a map.
|
ChangeEvent |
next()
Moves the cursor to the next change node and returns the
ChangeEvent
associated with the node. |
forEachRemaining, hasNext, removeChangeEvent next()
ChangeEvent
associated with the node.next in interface Iterator<ChangeEvent>String getFieldName()
ByteBuffer getFieldNameBytes()
int getArrayIndex()
boolean inMap()
`true` for all top level fieldsboolean inArray()
Value.Type getType()
long getOpTimestamp()
long getServerTimestamp()
byte getByte()
byte value of the current nodeTypeException - if the current EventType is not
BYTEshort getShort()
byte value of the current nodeTypeException - if the current EventType is not
SHORTint getInt()
int value of the current nodeTypeException - if the current EventType is not
INTlong getLong()
long value of the current nodeTypeException - if the current EventType is not
LONGfloat getFloat()
float value of the current nodeTypeException - if the current EventType is not
FLOATdouble getDouble()
double value of the current nodeTypeException - if the current EventType is not
DOUBLEBigDecimal getDecimal()
BigDecimal value of the current nodeTypeException - if the current EventType is not
DECIMALint getDecimalPrecision()
DECIMAL node.
(The precision is the number of digits in the unscaled value.)
The precision of a zero value is 1.
DECIMAL nodeTypeException - if the current EventType is not
DECIMALint getDecimalScale()
DECIMAL node. If the returned
value is zero or positive, the scale is the number of digits to the right
of the decimal point. If negative, the unscaled value of the number is
multiplied by ten to the power of the negation of the scale. For example,
a scale of -3 means the unscaled value is multiplied by 1000.DECIMAL nodeTypeException - if the current EventType is not
DECIMALint getDecimalValueAsInt()
int whose value is the unscaled value of this
DECIMAL.DECIMAL nodeTypeException - if the current EventType is not
DECIMALorg.w3c.dom.ranges.RangeException - if the precision of the decimal number is greater
than 9long getDecimalValueAsLong()
long whose value is the unscaled value of this
DECIMAL.DECIMAL nodeTypeException - if the current EventType is not
DECIMALorg.w3c.dom.ranges.RangeException - if the precision of the decimal number is greater
than 18ByteBuffer getDecimalValueAsBytes()
ByteBuffer containing the two's complement representation
of the current DECIMAL node. The byte array will be in big-endian
byte order: the most significant byte is in the zeroth element. The
array will contain the minimum number of bytes required to represent this
DECIMAL, including one sign bit.DECIMAL nodeboolean getBoolean()
boolean value of the current nodeTypeException - if the current EventType is not
BOOLEANString getString()
String value of the current nodeTypeException - if the current EventType is not
STRINGlong getTimestampLong()
Timestamp value of the current node as a long
representing the number of milliseconds since epochTypeException - if the current EventType is not
TIMESTAMPOTimestamp getTimestamp()
Timestamp value of the current nodeTypeException - if the current EventType is not
TIMESTAMPint getDateInt()
Date value of the current node as an int
representing the number of DAYS since epochTypeException - if the current EventType is not
DATEODate getDate()
Date value of the current nodeTypeException - if the current EventType is not
DATEint getTimeInt()
Time value of the current node as an int
representing the number of milliseconds since midnightTypeException - if the current EventType is not
TIMEOTime getTime()
Time value of the current nodeTypeException - if the current EventType is not
TIMEOInterval getInterval()
Interval value of the current nodeTypeException - if the current EventType is not
INTERVALlong getIntervalMillis()
TypeException - if the current EventType is not
INTERVALByteBuffer getBinary()
ByteBuffer value of the current nodeTypeException - if the current EventType is not
BINARYCopyright © 2015–2018 MapR Technologies, Inc.. All rights reserved.