Package org.nuxeo.lib.stream.computation
Class Record
java.lang.Object
org.nuxeo.lib.stream.computation.Record
- All Implemented Interfaces:
Externalizable
,Serializable
Basic data object that contains: key, watermark, flag and data.
- Since:
- 9.3
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected byte[]
protected EnumSet<Record.Flag>
protected byte
protected String
protected static final byte[]
protected byte[]
protected long
-
Constructor Summary
ConstructorDescriptionRecord()
Creates a record using current watermark corresponding to the current time, with a default flagCreates a record using a default flagRecord
(String key, byte[] data, long watermark, EnumSet<Record.Flag> flags) -
Method Summary
Modifier and TypeMethodDescriptiondataOverview
(int maxLength) protected EnumSet<Record.Flag>
decodeFlags
(byte encoded) protected short
encodeFlags
(EnumSet<Record.Flag> enumSet) boolean
byte[]
getData()
getFlags()
byte
getKey()
byte[]
long
int
hashCode()
static Record
Creates a record using current timestamp and default flagvoid
void
setData
(byte[] data) void
setFlags
(byte flagsAsByte) void
setFlags
(EnumSet<Record.Flag> flags) void
void
setWatermark
(long watermark) toString()
void
-
Field Details
-
NO_DATA
protected static final byte[] NO_DATA -
watermark
protected long watermark -
key
-
data
@Nullable protected byte[] data -
flags
-
flagsAsByte
protected byte flagsAsByte -
traceContext
@Nullable protected byte[] traceContext- Since:
- 11.1 used for tracing context propagation
-
appenderThread
-
-
Constructor Details
-
Record
public Record() -
Record
Creates a record using current watermark corresponding to the current time, with a default flag -
Record
Creates a record using a default flag -
Record
-
-
Method Details
-
of
Creates a record using current timestamp and default flag -
getWatermark
public long getWatermark() -
setWatermark
public void setWatermark(long watermark) -
getFlags
-
setFlags
-
setFlags
public void setFlags(byte flagsAsByte) -
getKey
-
setKey
-
getData
public byte[] getData() -
setData
public void setData(byte[] data) -
toString
-
dataOverview
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
encodeFlags
-
decodeFlags
-
equals
-
hashCode
public int hashCode() -
getFlagsAsByte
public byte getFlagsAsByte() -
getTraceContext
public byte[] getTraceContext() -
getAppenderThread
-