Class InstantSchema
- java.lang.Object
-
- org.apache.pulsar.client.impl.schema.AbstractSchema<java.time.Instant>
-
- org.apache.pulsar.client.impl.schema.InstantSchema
-
- All Implemented Interfaces:
java.lang.Cloneable,org.apache.pulsar.client.api.Schema<java.time.Instant>
public class InstantSchema extends AbstractSchema<java.time.Instant>
A schema for `java.time.Instant`.
-
-
Constructor Summary
Constructors Constructor Description InstantSchema()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.Instantdecode(byte[] bytes)java.time.Instantdecode(io.netty.buffer.ByteBuf byteBuf)Decode a byteBuf into an object using the schema definition and deserializer implementationbyte[]encode(java.time.Instant message)org.apache.pulsar.common.schema.SchemaInfogetSchemaInfo()static InstantSchemaof()-
Methods inherited from class org.apache.pulsar.client.impl.schema.AbstractSchema
atSchemaVersion, clone, decode
-
-
-
-
Method Detail
-
of
public static InstantSchema of()
-
encode
public byte[] encode(java.time.Instant message)
-
decode
public java.time.Instant decode(byte[] bytes)
-
decode
public java.time.Instant decode(io.netty.buffer.ByteBuf byteBuf)
Description copied from class:AbstractSchemaDecode a byteBuf into an object using the schema definition and deserializer implementationDo not modify reader/writer index of ByteBuf so, it can be reused to access correct data.
- Specified by:
decodein classAbstractSchema<java.time.Instant>- Parameters:
byteBuf- the byte buffer to decode- Returns:
- the deserialized object
-
getSchemaInfo
public org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo()
-
-