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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected byte[]protected EnumSet<Record.Flag> protected byteprotected Stringprotected static final byte[]protected byte[]protected long -
Constructor Summary
ConstructorsConstructorDescriptionRecord()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 shortencodeFlags(EnumSet<Record.Flag> enumSet) booleanbyte[]getData()getFlags()bytegetKey()byte[]longinthashCode()static RecordCreates a record using current timestamp and default flagvoidvoidsetData(byte[] data) voidsetFlags(byte flagsAsByte) voidsetFlags(EnumSet<Record.Flag> flags) voidvoidsetWatermark(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:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
encodeFlags
-
decodeFlags
-
equals
-
hashCode
public int hashCode() -
getFlagsAsByte
public byte getFlagsAsByte() -
getTraceContext
public byte[] getTraceContext() -
getAppenderThread
-