Uses of Interface
org.apache.pulsar.client.api.Schema
Packages that use Schema
Package
Description
Pulsar Client API.
Schema definitions for Pulsar Client API.
Helpers which provide useful functionality for the implementation of Pulsar Client API.
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 SchemaModifier and TypeFieldDescriptionSchema.BOOL
Boolean Schema.static final Schema
<ByteBuffer> Schema.BYTEBUFFER
ByteBuffer Schema.static final Schema
<byte[]> Schema.BYTES
Schema that doesn't perform any encoding on the message payloads.Schema.DATE
Date Schema.Schema.DOUBLE
Double Schema.Schema.FLOAT
Float Schema.Schema.INSTANT
Instant Schema.Schema.INT16
INT16 Schema.Schema.INT32
INT32 Schema.Schema.INT64
INT64 Schema.Schema.INT8
INT8 Schema.Schema.LOCAL_DATE
LocalDate Schema.static final Schema
<LocalDateTime> Schema.LOCAL_DATE_TIME
LocalDateTime Schema.Schema.LOCAL_TIME
LocalTime Schema.Schema.STRING
Schema that can be used to encode/decode messages whose values are String.Schema.TIME
Time Schema.Schema.TIMESTAMP
Timestamp Schema.Methods in org.apache.pulsar.client.api that return SchemaModifier and TypeMethodDescriptionstatic 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> 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.clone()
Duplicates the schema.static Schema
<?> Schema.getSchema
(SchemaInfo schemaInfo) static <T> Schema
<T> 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.Key Value Schema whose underneath key and value schemas are JSONSchema.Schema.KeyValue
(Class<K> key, Class<V> value, SchemaType type) Key Value Schema using passed in schema type, support JSON and AVRO currently.Key Value Schema using passed in key and value schemas withKeyValueEncodingType.INLINE
encoding type.Schema.KeyValue
(Schema<K> key, Schema<V> value, KeyValueEncodingType keyValueEncodingType) Key Value Schema using passed in key, value and encoding type schemas.Schema.KV_BYTES()
Schema that can be used to encode/decode KeyValue.static Schema
<byte[]> Schema.NATIVE_AVRO
(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> 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
(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 SchemaModifier and TypeMethodDescriptionMessage.getReaderSchema()
Get the schema associated to the message.Methods in org.apache.pulsar.client.api with parameters of type SchemaModifier and TypeMethodDescription<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.Key Value Schema using passed in key and value schemas withKeyValueEncodingType.INLINE
encoding type.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> Create a topic reader builder with a specificSchema
) to read from the specified topic.<T> TableViewBuilder
<T> PulsarClient.newTableView
(Schema<T> schema) Create a table view builder with a specific schema for subscribing on a specific topic.<T> TableViewBuilder
<T> PulsarClient.newTableViewBuilder
(Schema<T> schema) Deprecated.<T> void
MessagePayloadProcessor.process
(MessagePayload payload, MessagePayloadContext context, Schema<T> schema, 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.schemaModifier and TypeInterfaceDescriptioninterface
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 SchemaModifier and TypeMethodDescriptionKeyValueSchema.getKeySchema()
Get the Schema of the Key.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 SchemaModifier and TypeMethodDescriptionSchema
<?> PulsarClientImplementationBinding.getSchema
(SchemaInfo schemaInfo) PulsarClientImplementationBinding.newAutoConsumeSchema()
Schema
<byte[]> PulsarClientImplementationBinding.newAutoProduceSchema()
Schema
<byte[]> PulsarClientImplementationBinding.newAutoProduceSchema
(Schema<?> schema) Schema
<byte[]> PulsarClientImplementationBinding.newAutoProduceValidatedAvroSchema
(Object schema) <T> Schema
<T> PulsarClientImplementationBinding.newAvroSchema
(SchemaDefinition schemaDefinition) PulsarClientImplementationBinding.newBooleanSchema()
PulsarClientImplementationBinding.newByteBufferSchema()
PulsarClientImplementationBinding.newByteSchema()
Schema
<byte[]> PulsarClientImplementationBinding.newBytesSchema()
PulsarClientImplementationBinding.newDateSchema()
PulsarClientImplementationBinding.newDoubleSchema()
PulsarClientImplementationBinding.newFloatSchema()
PulsarClientImplementationBinding.newInstantSchema()
PulsarClientImplementationBinding.newIntSchema()
<T> Schema
<T> PulsarClientImplementationBinding.newJSONSchema
(SchemaDefinition schemaDefinition) PulsarClientImplementationBinding.newKeyValueBytesSchema()
PulsarClientImplementationBinding.newKeyValueSchema
(Class<K> key, Class<V> value, SchemaType type) PulsarClientImplementationBinding.newKeyValueSchema
(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) PulsarClientImplementationBinding.newLocalDateSchema()
PulsarClientImplementationBinding.newLocalDateTimeSchema()
PulsarClientImplementationBinding.newLocalTimeSchema()
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) PulsarClientImplementationBinding.newShortSchema()
PulsarClientImplementationBinding.newStringSchema()
PulsarClientImplementationBinding.newStringSchema
(Charset charset) PulsarClientImplementationBinding.newTimeSchema()
PulsarClientImplementationBinding.newTimestampSchema()
Methods in org.apache.pulsar.client.internal with parameters of type SchemaModifier and TypeMethodDescription<K,
V> SchemaInfo PulsarClientImplementationBinding.encodeKeyValueSchemaInfo
(String schemaName, Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key invalid input: '&' value into schema into a KeyValue schema.<K,
V> SchemaInfo PulsarClientImplementationBinding.encodeKeyValueSchemaInfo
(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key invalid input: '&' value into schema into a KeyValue schema.Schema
<byte[]> PulsarClientImplementationBinding.newAutoProduceSchema
(Schema<?> schema) 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
PulsarClient.newTableView(Schema)
to build and configure aTableViewBuilder
instance