类 PulsarClientImplementationBindingImpl
java.lang.Object
org.apache.pulsar.client.impl.PulsarClientImplementationBindingImpl
- 所有已实现的接口:
PulsarClientImplementationBinding
public final class PulsarClientImplementationBindingImpl
extends Object
implements PulsarClientImplementationBinding
Helper class for class instantiations and it also contains methods to work with schemas.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明byte[]convertKeyValueDataStringToSchemaInfoSchema(byte[] keyValueSchemaInfoDataJsonBytes) Convert the key/value schema info data json bytes to key/value schema info data bytes.convertKeyValueSchemaInfoDataToString(KeyValue<SchemaInfo, SchemaInfo> kvSchemaInfo) Convert the key/value schema data.createAuthentication(String authPluginClassName, String authParamsString) createAuthentication(String authPluginClassName, Map<String, String> authParams) decodeKeyValueEncodingType(SchemaInfo schemaInfo) Decode the kv encoding type from the schema info.decodeKeyValueSchemaInfo(SchemaInfo schemaInfo) Decode the key/value schema info to get key schema info and value schema info.<K,V> SchemaInfo encodeKeyValueSchemaInfo(String schemaName, Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.<K,V> SchemaInfo encodeKeyValueSchemaInfo(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.getGenericSchema(SchemaInfo schemaInfo) Schema<?>getSchema(SchemaInfo schemaInfo) jsonifyKeyValueSchemaInfo(KeyValue<SchemaInfo, SchemaInfo> kvSchemaInfo) Jsonify the key/value schema info.jsonifySchemaInfo(SchemaInfo schemaInfo) Jsonify the schema info.jsonifySchemaInfoWithVersion(SchemaInfoWithVersion schemaInfoWithVersion) Jsonify the schema info with version.newAuthenticationTLS(String certFilePath, String keyFilePath) newAuthenticationToken(String token) newAuthenticationToken(Supplier<String> supplier) Schema<byte[]>Schema<byte[]>newAutoProduceSchema(Schema<?> schema) Schema<byte[]><T> Schema<T>newAvroSchema(SchemaDefinition schemaDefinition) Schema<byte[]><T> Schema<T>newJSONSchema(SchemaDefinition schemaDefinition) newKeyValueSchema(Class<K> key, Class<V> value, SchemaType type) newKeyValueSchema(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) newMessageId(long ledgerId, long entryId, int partitionIndex) newMessageIdFromByteArray(byte[] data) newMessageIdFromByteArrayWithTopic(byte[] data, String topicName) <T extends com.google.protobuf.GeneratedMessageV3>
Schema<T>newProtobufNativeSchema(SchemaDefinition schemaDefinition) <T extends com.google.protobuf.GeneratedMessageV3>
Schema<T>newProtobufSchema(SchemaDefinition schemaDefinition) newRecordSchemaBuilder(String name) <T> SchemaDefinitionBuilder<T>newSchemaInfoImpl(String name, byte[] schema, SchemaType type, long timestamp, Map<String, String> propertiesValue) newStringSchema(Charset charset) newTopicMessageId(String topic, MessageId messageId)
-
构造器详细资料
-
PulsarClientImplementationBindingImpl
public PulsarClientImplementationBindingImpl()
-
-
方法详细资料
-
newSchemaDefinitionBuilder
-
newClientBuilder
-
newMessageId
-
newMessageIdFromByteArray
-
newMessageIdFromByteArrayWithTopic
public MessageId newMessageIdFromByteArrayWithTopic(byte[] data, String topicName) throws IOException -
newAuthenticationToken
-
newAuthenticationToken
-
newAuthenticationTLS
-
createAuthentication
public Authentication createAuthentication(String authPluginClassName, String authParamsString) throws PulsarClientException.UnsupportedAuthenticationException -
createAuthentication
public Authentication createAuthentication(String authPluginClassName, Map<String, String> authParams) throws PulsarClientException.UnsupportedAuthenticationException -
newBytesSchema
-
newStringSchema
-
newStringSchema
-
newByteSchema
-
newShortSchema
-
newIntSchema
-
newLongSchema
-
newBooleanSchema
-
newByteBufferSchema
-
newFloatSchema
-
newDoubleSchema
-
newDateSchema
-
newTimeSchema
-
newTimestampSchema
-
newInstantSchema
-
newLocalDateSchema
-
newLocalTimeSchema
-
newLocalDateTimeSchema
-
newAvroSchema
-
newProtobufSchema
public <T extends com.google.protobuf.GeneratedMessageV3> Schema<T> newProtobufSchema(SchemaDefinition schemaDefinition) -
newProtobufNativeSchema
public <T extends com.google.protobuf.GeneratedMessageV3> Schema<T> newProtobufNativeSchema(SchemaDefinition schemaDefinition) -
newJSONSchema
-
newAutoConsumeSchema
-
newAutoProduceSchema
-
newAutoProduceSchema
-
newAutoProduceValidatedAvroSchema
-
newKeyValueBytesSchema
-
newKeyValueSchema
public <K,V> Schema<KeyValue<K,V>> newKeyValueSchema(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) -
newKeyValueSchema
public <K,V> Schema<KeyValue<K,V>> newKeyValueSchema(Class<K> key, Class<V> value, SchemaType type) -
getSchema
- 指定者:
getSchema在接口中PulsarClientImplementationBinding
-
getGenericSchema
-
newRecordSchemaBuilder
-
decodeKeyValueEncodingType
Decode the kv encoding type from the schema info.- 指定者:
decodeKeyValueEncodingType在接口中PulsarClientImplementationBinding- 参数:
schemaInfo- the schema info- 返回:
- the kv encoding type
-
encodeKeyValueSchemaInfo
public <K,V> SchemaInfo encodeKeyValueSchemaInfo(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.- 指定者:
encodeKeyValueSchemaInfo在接口中PulsarClientImplementationBinding- 参数:
keySchema- the key schemavalueSchema- the value schemakeyValueEncodingType- the encoding type to encode and decode key value pair- 返回:
- the final schema info
-
encodeKeyValueSchemaInfo
public <K,V> SchemaInfo encodeKeyValueSchemaInfo(String schemaName, Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType) Encode key & value into schema into a KeyValue schema.- 指定者:
encodeKeyValueSchemaInfo在接口中PulsarClientImplementationBinding- 参数:
schemaName- the final schema namekeySchema- the key schemavalueSchema- the value schemakeyValueEncodingType- the encoding type to encode and decode key value pair- 返回:
- the final schema info
-
decodeKeyValueSchemaInfo
Decode the key/value schema info to get key schema info and value schema info.- 指定者:
decodeKeyValueSchemaInfo在接口中PulsarClientImplementationBinding- 参数:
schemaInfo- key/value schema info.- 返回:
- the pair of key schema info and value schema info
-
jsonifySchemaInfo
Jsonify the schema info.- 指定者:
jsonifySchemaInfo在接口中PulsarClientImplementationBinding- 参数:
schemaInfo- the schema info- 返回:
- the jsonified schema info
-
jsonifySchemaInfoWithVersion
Jsonify the schema info with version.- 指定者:
jsonifySchemaInfoWithVersion在接口中PulsarClientImplementationBinding- 参数:
schemaInfoWithVersion- the schema info with version- 返回:
- the jsonified schema info with version
-
jsonifyKeyValueSchemaInfo
Jsonify the key/value schema info.- 指定者:
jsonifyKeyValueSchemaInfo在接口中PulsarClientImplementationBinding- 参数:
kvSchemaInfo- the key/value schema info- 返回:
- the jsonified schema info
-
convertKeyValueSchemaInfoDataToString
public String convertKeyValueSchemaInfoDataToString(KeyValue<SchemaInfo, SchemaInfo> kvSchemaInfo) throws IOExceptionConvert the key/value schema data.- 指定者:
convertKeyValueSchemaInfoDataToString在接口中PulsarClientImplementationBinding- 参数:
kvSchemaInfo- the key/value schema info- 返回:
- the convert key/value schema data string
- 抛出:
IOException
-
convertKeyValueDataStringToSchemaInfoSchema
public byte[] convertKeyValueDataStringToSchemaInfoSchema(byte[] keyValueSchemaInfoDataJsonBytes) throws IOException Convert the key/value schema info data json bytes to key/value schema info data bytes.- 指定者:
convertKeyValueDataStringToSchemaInfoSchema在接口中PulsarClientImplementationBinding- 参数:
keyValueSchemaInfoDataJsonBytes- the key/value schema info data json bytes- 返回:
- the key/value schema info data bytes
- 抛出:
IOException
-
newDefaultBatcherBuilder
-
newKeyBasedBatcherBuilder
-
newDefaultMessagePayloadFactory
-
newSchemaInfoImpl
public SchemaInfo newSchemaInfoImpl(String name, byte[] schema, SchemaType type, long timestamp, Map<String, String> propertiesValue) -
newTopicMessageId
-