Package org.apache.pulsar.client.admin
Interface Schemas
-
public interface SchemasAdmin interface on interacting with schemas.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateSchema(java.lang.String topic, PostSchemaPayload schemaPayload)Create a schema for a given topic.voidcreateSchema(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)Create a schema for a given topic with the provided schema info.java.util.concurrent.CompletableFuture<java.lang.Void>createSchemaAsync(java.lang.String topic, PostSchemaPayload schemaPayload)Create a schema for a given topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Void>createSchemaAsync(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)Create a schema for a given topic with the provided schema info asynchronously.voiddeleteSchema(java.lang.String topic)Delete the schema associated with a given topic.java.util.concurrent.CompletableFuture<java.lang.Void>deleteSchemaAsync(java.lang.String topic)Delete the schema associated with a given topic asynchronously.java.util.List<org.apache.pulsar.common.schema.SchemaInfo>getAllSchemas(java.lang.String topic)Get all version schemas topic.java.util.concurrent.CompletableFuture<java.util.List<org.apache.pulsar.common.schema.SchemaInfo>>getAllSchemasAsync(java.lang.String topic)Get all version schemas topic asynchronously.org.apache.pulsar.common.schema.SchemaInfogetSchemaInfo(java.lang.String topic)Retrieve the latest schema of a topic.org.apache.pulsar.common.schema.SchemaInfogetSchemaInfo(java.lang.String topic, long version)Retrieve the schema of a topic at a given version.java.util.concurrent.CompletableFuture<org.apache.pulsar.common.schema.SchemaInfo>getSchemaInfoAsync(java.lang.String topic)Retrieve the latest schema of a topic asynchronously.java.util.concurrent.CompletableFuture<org.apache.pulsar.common.schema.SchemaInfo>getSchemaInfoAsync(java.lang.String topic, long version)Retrieve the schema of a topic at a given version asynchronously.org.apache.pulsar.common.schema.SchemaInfoWithVersiongetSchemaInfoWithVersion(java.lang.String topic)Retrieve the latest schema with verison of a topic.java.util.concurrent.CompletableFuture<org.apache.pulsar.common.schema.SchemaInfoWithVersion>getSchemaInfoWithVersionAsync(java.lang.String topic)Retrieve the latest schema with verison of a topic asynchronously.java.lang.LonggetVersionBySchema(java.lang.String topic, PostSchemaPayload schemaPayload)Find schema version topic.java.lang.LonggetVersionBySchema(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)Find schema version topic.java.util.concurrent.CompletableFuture<java.lang.Long>getVersionBySchemaAsync(java.lang.String topic, PostSchemaPayload schemaPayload)Find schema version topic asynchronously.java.util.concurrent.CompletableFuture<java.lang.Long>getVersionBySchemaAsync(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)Find schema version topic asynchronously.IsCompatibilityResponsetestCompatibility(java.lang.String topic, PostSchemaPayload schemaPayload)Judge schema compatibility topic.IsCompatibilityResponsetestCompatibility(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)Judge schema compatibility topic.java.util.concurrent.CompletableFuture<IsCompatibilityResponse>testCompatibilityAsync(java.lang.String topic, PostSchemaPayload schemaPayload)Judge schema compatibility topic asynchronously.java.util.concurrent.CompletableFuture<IsCompatibilityResponse>testCompatibilityAsync(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)Judge schema compatibility topic asynchronously.
-
-
-
Method Detail
-
getSchemaInfo
org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo(java.lang.String topic) throws PulsarAdminExceptionRetrieve the latest schema of a topic.- Parameters:
topic- topic name, in fully qualified format- Returns:
- latest schema
- Throws:
PulsarAdminException
-
getSchemaInfoAsync
java.util.concurrent.CompletableFuture<org.apache.pulsar.common.schema.SchemaInfo> getSchemaInfoAsync(java.lang.String topic)
Retrieve the latest schema of a topic asynchronously.- Parameters:
topic- topic name, in fully qualified format- Returns:
- latest schema
-
getSchemaInfoWithVersion
org.apache.pulsar.common.schema.SchemaInfoWithVersion getSchemaInfoWithVersion(java.lang.String topic) throws PulsarAdminExceptionRetrieve the latest schema with verison of a topic.- Parameters:
topic- topic name, in fully qualified format- Returns:
- latest schema with version
- Throws:
PulsarAdminException
-
getSchemaInfoWithVersionAsync
java.util.concurrent.CompletableFuture<org.apache.pulsar.common.schema.SchemaInfoWithVersion> getSchemaInfoWithVersionAsync(java.lang.String topic)
Retrieve the latest schema with verison of a topic asynchronously.- Parameters:
topic- topic name, in fully qualified format- Returns:
- latest schema with version
-
getSchemaInfo
org.apache.pulsar.common.schema.SchemaInfo getSchemaInfo(java.lang.String topic, long version) throws PulsarAdminExceptionRetrieve the schema of a topic at a given version.- Parameters:
topic- topic name, in fully qualified formatversion- schema version- Returns:
- the schema info at a given version
- Throws:
PulsarAdminException
-
getSchemaInfoAsync
java.util.concurrent.CompletableFuture<org.apache.pulsar.common.schema.SchemaInfo> getSchemaInfoAsync(java.lang.String topic, long version)Retrieve the schema of a topic at a given version asynchronously.- Parameters:
topic- topic name, in fully qualified formatversion- schema version- Returns:
- the schema info at a given version
-
deleteSchema
void deleteSchema(java.lang.String topic) throws PulsarAdminExceptionDelete the schema associated with a given topic.- Parameters:
topic- topic name, in fully qualified format- Throws:
PulsarAdminException
-
deleteSchemaAsync
java.util.concurrent.CompletableFuture<java.lang.Void> deleteSchemaAsync(java.lang.String topic)
Delete the schema associated with a given topic asynchronously.- Parameters:
topic- topic name, in fully qualified format
-
createSchema
void createSchema(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo) throws PulsarAdminExceptionCreate a schema for a given topic with the provided schema info.- Parameters:
topic- topic name, in fully qualified fomratschemaInfo- schema info- Throws:
PulsarAdminException
-
createSchemaAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createSchemaAsync(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)Create a schema for a given topic with the provided schema info asynchronously.- Parameters:
topic- topic name, in fully qualified fomratschemaInfo- schema info
-
createSchema
void createSchema(java.lang.String topic, PostSchemaPayload schemaPayload) throws PulsarAdminExceptionCreate a schema for a given topic.- Parameters:
topic- topic name, in fully qualified formatschemaPayload- schema payload- Throws:
PulsarAdminException
-
createSchemaAsync
java.util.concurrent.CompletableFuture<java.lang.Void> createSchemaAsync(java.lang.String topic, PostSchemaPayload schemaPayload)Create a schema for a given topic asynchronously.- Parameters:
topic- topic name, in fully qualified formatschemaPayload- schema payload
-
testCompatibility
IsCompatibilityResponse testCompatibility(java.lang.String topic, PostSchemaPayload schemaPayload) throws PulsarAdminException
Judge schema compatibility topic.- Parameters:
topic- topic name, in fully qualified formatschemaPayload- schema payload- Throws:
PulsarAdminException
-
testCompatibilityAsync
java.util.concurrent.CompletableFuture<IsCompatibilityResponse> testCompatibilityAsync(java.lang.String topic, PostSchemaPayload schemaPayload)
Judge schema compatibility topic asynchronously.- Parameters:
topic- topic name, in fully qualified formatschemaPayload- schema payload
-
getVersionBySchema
java.lang.Long getVersionBySchema(java.lang.String topic, PostSchemaPayload schemaPayload) throws PulsarAdminExceptionFind schema version topic.- Parameters:
topic- topic name, in fully qualified formatschemaPayload- schema payload- Throws:
PulsarAdminException
-
getVersionBySchemaAsync
java.util.concurrent.CompletableFuture<java.lang.Long> getVersionBySchemaAsync(java.lang.String topic, PostSchemaPayload schemaPayload)Find schema version topic asynchronously.- Parameters:
topic- topic name, in fully qualified formatschemaPayload- schema payload
-
testCompatibility
IsCompatibilityResponse testCompatibility(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo) throws PulsarAdminException
Judge schema compatibility topic.- Parameters:
topic- topic name, in fully qualified formatschemaInfo- schema info- Throws:
PulsarAdminException
-
testCompatibilityAsync
java.util.concurrent.CompletableFuture<IsCompatibilityResponse> testCompatibilityAsync(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)
Judge schema compatibility topic asynchronously.- Parameters:
topic- topic name, in fully qualified formatschemaInfo- schema info
-
getVersionBySchema
java.lang.Long getVersionBySchema(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo) throws PulsarAdminExceptionFind schema version topic.- Parameters:
topic- topic name, in fully qualified formatschemaInfo- schema info- Throws:
PulsarAdminException
-
getVersionBySchemaAsync
java.util.concurrent.CompletableFuture<java.lang.Long> getVersionBySchemaAsync(java.lang.String topic, org.apache.pulsar.common.schema.SchemaInfo schemaInfo)Find schema version topic asynchronously.- Parameters:
topic- topic name, in fully qualified formatschemaInfo- schema info
-
getAllSchemas
java.util.List<org.apache.pulsar.common.schema.SchemaInfo> getAllSchemas(java.lang.String topic) throws PulsarAdminExceptionGet all version schemas topic.- Parameters:
topic- topic name, in fully qualified format- Throws:
PulsarAdminException
-
getAllSchemasAsync
java.util.concurrent.CompletableFuture<java.util.List<org.apache.pulsar.common.schema.SchemaInfo>> getAllSchemasAsync(java.lang.String topic)
Get all version schemas topic asynchronously.- Parameters:
topic- topic name, in fully qualified format
-
-