Uses of Interface
org.apache.pulsar.client.api.Schema
-
Packages that use Schema Package Description org.apache.pulsar.client.api Pulsar Client API.org.apache.pulsar.client.api.schema Schema definitions for Pulsar Client API.org.apache.pulsar.client.internal Helpers which provide useful functionality for the implementation of Pulsar Client API.org.apache.pulsar.common.schema This package contains data structures for schema definitions used in the Pulsar Client API. -
-
Uses of Schema in org.apache.pulsar.client.api
Fields in org.apache.pulsar.client.api declared as Schema Modifier and Type Field Description static Schema<java.lang.Boolean>
Schema. BOOL
Boolean Schema.static Schema<java.nio.ByteBuffer>
Schema. BYTEBUFFER
ByteBuffer Schema.static Schema<byte[]>
Schema. BYTES
Schema that doesn't perform any encoding on the message payloads.static Schema<java.util.Date>
Schema. DATE
Date Schema.static Schema<java.lang.Double>
Schema. DOUBLE
Double Schema.static Schema<java.lang.Float>
Schema. FLOAT
Float Schema.static Schema<java.time.Instant>
Schema. INSTANT
Instant Schema.static Schema<java.lang.Short>
Schema. INT16
INT16 Schema.static Schema<java.lang.Integer>
Schema. INT32
INT32 Schema.static Schema<java.lang.Long>
Schema. INT64
INT64 Schema.static Schema<java.lang.Byte>
Schema. INT8
INT8 Schema.static Schema<java.time.LocalDate>
Schema. LOCAL_DATE
LocalDate Schema.static Schema<java.time.LocalDateTime>
Schema. LOCAL_DATE_TIME
LocalDateTime Schema.static Schema<java.time.LocalTime>
Schema. LOCAL_TIME
LocalTime Schema.static Schema<java.lang.String>
Schema. STRING
Schema that can be used to encode/decode messages whose values are String.static Schema<java.sql.Time>
Schema. TIME
Time Schema.static Schema<java.sql.Timestamp>
Schema. TIMESTAMP
Timestamp Schema.Methods in org.apache.pulsar.client.api that return Schema Modifier and Type Method Description static Schema<GenericRecord>
Schema. AUTO()
Deprecated.static Schema<GenericRecord>
Schema. AUTO_CONSUME()
Create a schema instance that automatically deserialize messages based on the current topic schema.static Schema<byte[]>
Schema. AUTO_PRODUCE_BYTES()
Create a schema instance that accepts a serialized payload and validates it against the topic schema.static Schema<byte[]>
Schema. AUTO_PRODUCE_BYTES(Schema<?> schema)
Create a schema instance that accepts a serialized payload and validates it against the schema specified.static <T> Schema<T>
Schema. AVRO(java.lang.Class<T> pojo)
Create a Avro schema type by default configuration of the class.static <T> Schema<T>
Schema. AVRO(SchemaDefinition<T> schemaDefinition)
Create a Avro schema type with schema definition.Schema<T>
Schema. clone()
Duplicates the schema.static Schema<?>
Schema. getSchema(SchemaInfo schemaInfo)
static <T> Schema<T>
Schema. JSON(java.lang.Class<T> pojo)
Create a JSON schema type by extracting the fields of the specified class.static <T> Schema<T>
Schema. JSON(SchemaDefinition schemaDefinition)
Create a JSON schema type with schema definition.static <K,V>
Schema<KeyValue<K,V>>Schema. KeyValue(java.lang.Class<K> key, java.lang.Class<V> value)
Key Value Schema whose underneath key and value schemas are JSONSchema.static <K,V>
Schema<KeyValue<K,V>>Schema. KeyValue(java.lang.Class<K> key, java.lang.Class<V> value, SchemaType type)
Key Value Schema using passed in schema type, support JSON and AVRO currently.static <K,V>
Schema<KeyValue<K,V>>Schema. KeyValue(Schema<K> key, Schema<V> value)
Key Value Schema using passed in key and value schemas.static <K,V>
Schema<KeyValue<K,V>>Schema. KeyValue(Schema<K> key, Schema<V> value, KeyValueEncodingType keyValueEncodingType)
Key Value Schema using passed in key, value and encoding type schemas.static Schema<KeyValue<byte[],byte[]>>
Schema. KV_BYTES()
Schema that can be used to encode/decode KeyValue.static Schema<byte[]>
Schema. NATIVE_AVRO(java.lang.Object schema)
Create a schema instance that accepts a serialized Avro payload without validating it against the schema specified.static <T extends com.google.protobuf.GeneratedMessageV3>
Schema<T>Schema. PROTOBUF(java.lang.Class<T> clazz)
Create a Protobuf schema type by extracting the fields of the specified class.static <T extends com.google.protobuf.GeneratedMessageV3>
Schema<T>Schema. PROTOBUF(SchemaDefinition<T> schemaDefinition)
Create a Protobuf schema type with schema definition.static <T extends com.google.protobuf.GeneratedMessageV3>
Schema<T>Schema. PROTOBUF_NATIVE(java.lang.Class<T> clazz)
Create a Protobuf-Native schema type by extracting the fields of the specified class.static <T extends com.google.protobuf.GeneratedMessageV3>
Schema<T>Schema. PROTOBUF_NATIVE(SchemaDefinition<T> schemaDefinition)
Create a Protobuf-Native schema type with schema definition.Methods in org.apache.pulsar.client.api that return types with arguments of type Schema Modifier and Type Method Description default java.util.Optional<Schema<?>>
Message. getReaderSchema()
Get the schema associated to the message.Methods in org.apache.pulsar.client.api with parameters of type Schema Modifier and Type Method Description <T> Message<T>
MessagePayloadContext. asSingleMessage(MessagePayload payload, Schema<T> schema)
Convert the given payload to a single message if the entry is not a batch.static Schema<byte[]>
Schema. AUTO_PRODUCE_BYTES(Schema<?> schema)
Create a schema instance that accepts a serialized payload and validates it against the schema specified.<T> Message<T>
MessagePayloadContext. getMessageAt(int index, int numMessages, MessagePayload payload, boolean containMetadata, Schema<T> schema)
Get the internal single message with a specific index from a payload if the payload is a batch.static <K,V>
Schema<KeyValue<K,V>>Schema. KeyValue(Schema<K> key, Schema<V> value)
Key Value Schema using passed in key and value schemas.static <K,V>
Schema<KeyValue<K,V>>Schema. KeyValue(Schema<K> key, Schema<V> value, KeyValueEncodingType keyValueEncodingType)
Key Value Schema using passed in key, value and encoding type schemas.<T> ConsumerBuilder<T>
PulsarClient. newConsumer(Schema<T> schema)
Create a consumer builder with a specific schema for subscribing on a specific topic<V> TypedMessageBuilder<V>
Producer. newMessage(Schema<V> schema)
Create a new message builder with schema, not required same parameterized type with the producer.<T> ProducerBuilder<T>
PulsarClient. newProducer(Schema<T> schema)
Create a producer builder that can be used to configure and construct a producer with the specified schema.<T> ReaderBuilder<T>
PulsarClient. newReader(Schema<T> schema)
Create a topic reader builder with a specificSchema
) to read from the specified topic.<T> TableViewBuilder<T>
PulsarClient. newTableViewBuilder(Schema<T> schema)
Create a table view builder with a specific schema for subscribing on a specific topic.<T> void
MessagePayloadProcessor. process(MessagePayload payload, MessagePayloadContext context, Schema<T> schema, java.util.function.Consumer<Message<T>> messageConsumer)
Process the message payload. -
Uses of Schema in org.apache.pulsar.client.api.schema
Subinterfaces of Schema in org.apache.pulsar.client.api.schema Modifier and Type Interface Description interface
GenericSchema<T extends GenericRecord>
A schema that serializes and deserializes betweenGenericRecord
and bytes.interface
KeyValueSchema<K,V>
This interface models a Schema that is composed of two parts.Methods in org.apache.pulsar.client.api.schema that return Schema Modifier and Type Method Description Schema<K>
KeyValueSchema. getKeySchema()
Get the Schema of the Key.Schema<V>
KeyValueSchema. getValueSchema()
Get the Schema of the Value. -
Uses of Schema in org.apache.pulsar.client.internal
Methods in org.apache.pulsar.client.internal that return Schema Modifier and Type Method Description Schema<?>
PulsarClientImplementationBinding. getSchema(SchemaInfo schemaInfo)
Schema<GenericRecord>
PulsarClientImplementationBinding. newAutoConsumeSchema()
Schema<byte[]>
PulsarClientImplementationBinding. newAutoProduceSchema()
Schema<byte[]>
PulsarClientImplementationBinding. newAutoProduceSchema(Schema<?> schema)
Schema<byte[]>
PulsarClientImplementationBinding. newAutoProduceValidatedAvroSchema(java.lang.Object schema)
<T> Schema<T>
PulsarClientImplementationBinding. newAvroSchema(SchemaDefinition schemaDefinition)
Schema<java.lang.Boolean>
PulsarClientImplementationBinding. newBooleanSchema()
Schema<java.nio.ByteBuffer>
PulsarClientImplementationBinding. newByteBufferSchema()
Schema<java.lang.Byte>
PulsarClientImplementationBinding. newByteSchema()
Schema<byte[]>
PulsarClientImplementationBinding. newBytesSchema()
Schema<java.util.Date>
PulsarClientImplementationBinding. newDateSchema()
Schema<java.lang.Double>
PulsarClientImplementationBinding. newDoubleSchema()
Schema<java.lang.Float>
PulsarClientImplementationBinding. newFloatSchema()
Schema<java.time.Instant>
PulsarClientImplementationBinding. newInstantSchema()
Schema<java.lang.Integer>
PulsarClientImplementationBinding. newIntSchema()
<T> Schema<T>
PulsarClientImplementationBinding. newJSONSchema(SchemaDefinition schemaDefinition)
Schema<KeyValue<byte[],byte[]>>
PulsarClientImplementationBinding. newKeyValueBytesSchema()
<K,V>
Schema<KeyValue<K,V>>PulsarClientImplementationBinding. newKeyValueSchema(java.lang.Class<K> key, java.lang.Class<V> value, SchemaType type)
<K,V>
Schema<KeyValue<K,V>>PulsarClientImplementationBinding. newKeyValueSchema(Schema<K> keySchema, Schema<V> valueSchema)
<K,V>
Schema<KeyValue<K,V>>PulsarClientImplementationBinding. newKeyValueSchema(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType)
Schema<java.time.LocalDate>
PulsarClientImplementationBinding. newLocalDateSchema()
Schema<java.time.LocalDateTime>
PulsarClientImplementationBinding. newLocalDateTimeSchema()
Schema<java.time.LocalTime>
PulsarClientImplementationBinding. newLocalTimeSchema()
Schema<java.lang.Long>
PulsarClientImplementationBinding. newLongSchema()
<T extends com.google.protobuf.GeneratedMessageV3>
Schema<T>PulsarClientImplementationBinding. newProtobufNativeSchema(SchemaDefinition schemaDefinition)
<T extends com.google.protobuf.GeneratedMessageV3>
Schema<T>PulsarClientImplementationBinding. newProtobufSchema(SchemaDefinition schemaDefinition)
Schema<java.lang.Short>
PulsarClientImplementationBinding. newShortSchema()
Schema<java.lang.String>
PulsarClientImplementationBinding. newStringSchema()
Schema<java.lang.String>
PulsarClientImplementationBinding. newStringSchema(java.nio.charset.Charset charset)
Schema<java.sql.Time>
PulsarClientImplementationBinding. newTimeSchema()
Schema<java.sql.Timestamp>
PulsarClientImplementationBinding. newTimestampSchema()
Methods in org.apache.pulsar.client.internal with parameters of type Schema Modifier and Type Method Description <K,V>
SchemaInfoPulsarClientImplementationBinding. encodeKeyValueSchemaInfo(java.lang.String schemaName, Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType)
Encode key & value into schema into a KeyValue schema.<K,V>
SchemaInfoPulsarClientImplementationBinding. encodeKeyValueSchemaInfo(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType)
Encode key & value into schema into a KeyValue schema.Schema<byte[]>
PulsarClientImplementationBinding. newAutoProduceSchema(Schema<?> schema)
<K,V>
Schema<KeyValue<K,V>>PulsarClientImplementationBinding. newKeyValueSchema(Schema<K> keySchema, Schema<V> valueSchema)
<K,V>
Schema<KeyValue<K,V>>PulsarClientImplementationBinding. newKeyValueSchema(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType)
-
Uses of Schema in org.apache.pulsar.common.schema
Methods in org.apache.pulsar.common.schema with parameters of type Schema Modifier and Type Method Description static <K,V>
byte[]KeyValue. encode(K key, Schema<K> keyWriter, V value, Schema<V> valueWriter)
Encode a key and value pair into a bytes array.
-