public class DefaultImplementation extends Object
Constructor and Description |
---|
DefaultImplementation() |
public static <T> SchemaDefinitionBuilder<T> newSchemaDefinitionBuilder()
public static ClientBuilder newClientBuilder()
public static MessageId newMessageId(long ledgerId, long entryId, int partitionIndex)
public static MessageId newMessageIdFromByteArray(byte[] data)
public static MessageId newMessageIdFromByteArrayWithTopic(byte[] data, String topicName)
public static Authentication newAuthenticationToken(String token)
public static Authentication newAuthenticationToken(Supplier<String> supplier)
public static Authentication newAuthenticationTLS(String certFilePath, String keyFilePath)
public static Authentication createAuthentication(String authPluginClassName, String authParamsString) throws PulsarClientException.UnsupportedAuthenticationException
public static Authentication createAuthentication(String authPluginClassName, Map<String,String> authParams) throws PulsarClientException.UnsupportedAuthenticationException
public static Schema<byte[]> newBytesSchema()
public static Schema<ByteBuffer> newByteBufferSchema()
public static Schema<LocalDateTime> newLocalDateTimeSchema()
public static <T> Schema<T> newAvroSchema(SchemaDefinition schemaDefinition)
public static <T extends com.google.protobuf.GeneratedMessageV3> Schema<T> newProtobufSchema(SchemaDefinition schemaDefinition)
public static <T extends com.google.protobuf.GeneratedMessageV3> Schema<T> newProtobufNativeSchema(SchemaDefinition schemaDefinition)
public static <T> Schema<T> newJSONSchema(SchemaDefinition schemaDefinition)
public static Schema<GenericRecord> newAutoConsumeSchema()
public static Schema<byte[]> newAutoProduceSchema()
public static <K,V> Schema<KeyValue<K,V>> newKeyValueSchema(Schema<K> keySchema, Schema<V> valueSchema)
public static <K,V> Schema<KeyValue<K,V>> newKeyValueSchema(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType)
public static <K,V> Schema<KeyValue<K,V>> newKeyValueSchema(Class<K> key, Class<V> value, SchemaType type)
public static Schema<?> getSchema(SchemaInfo schemaInfo)
public static GenericSchema<GenericRecord> getGenericSchema(SchemaInfo schemaInfo)
public static RecordSchemaBuilder newRecordSchemaBuilder(String name)
public static KeyValueEncodingType decodeKeyValueEncodingType(SchemaInfo schemaInfo)
schemaInfo
- the schema infopublic static <K,V> SchemaInfo encodeKeyValueSchemaInfo(Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType)
keySchema
- the key schemavalueSchema
- the value schemakeyValueEncodingType
- the encoding type to encode and decode key value pairpublic static <K,V> SchemaInfo encodeKeyValueSchemaInfo(String schemaName, Schema<K> keySchema, Schema<V> valueSchema, KeyValueEncodingType keyValueEncodingType)
schemaName
- the final schema namekeySchema
- the key schemavalueSchema
- the value schemakeyValueEncodingType
- the encoding type to encode and decode key value pairpublic static KeyValue<SchemaInfo,SchemaInfo> decodeKeyValueSchemaInfo(SchemaInfo schemaInfo)
schemaInfo
- key/value schema info.public static String jsonifySchemaInfo(SchemaInfo schemaInfo)
schemaInfo
- the schema infopublic static String jsonifySchemaInfoWithVersion(SchemaInfoWithVersion schemaInfoWithVersion)
schemaInfoWithVersion
- the schema info with versionpublic static String jsonifyKeyValueSchemaInfo(KeyValue<SchemaInfo,SchemaInfo> kvSchemaInfo)
kvSchemaInfo
- the key/value schema infopublic static String convertKeyValueSchemaInfoDataToString(KeyValue<SchemaInfo,SchemaInfo> kvSchemaInfo)
kvSchemaInfo
- the key/value schema infopublic static byte[] convertKeyValueDataStringToSchemaInfoSchema(byte[] keyValueSchemaInfoDataJsonBytes)
keyValueSchemaInfoDataJsonBytes
- the key/value schema info data json bytespublic static BatcherBuilder newDefaultBatcherBuilder()
public static BatcherBuilder newKeyBasedBatcherBuilder()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.