Interface RemoteSchemasAdmin
- All Known Implementing Classes:
RemoteSchemasAdminImpl
@Experimental
public interface RemoteSchemasAdmin
Manages schema operations such as create, update, delete, and retrieval.
Marked as Experimental as it may change.
- Since:
- 16.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordHolds a schema name and its associated error message.static final recordFor multiple schema errors.static classstatic enum -
Method Summary
Modifier and TypeMethodDescriptiondefault Map<String, RemoteSchemasAdmin.SchemaOpResult> create(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Creates schemas from a descriptor source.create(org.infinispan.protostream.schema.Schema schema) Creates a new schema.createAsync(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Non-blocking version ofcreate(FileDescriptorSource)createAsync(org.infinispan.protostream.schema.Schema schema) Non-blocking version ofcreate(Schema)default Map<String, RemoteSchemasAdmin.SchemaOpResult> createOrUpdate(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Non-blocking version ofcreateOrUpdate(FileDescriptorSource)createOrUpdate(org.infinispan.protostream.schema.Schema schema) Creates or updates a schema.createOrUpdate(org.infinispan.protostream.schema.Schema schema, boolean force) Creates or updates a schema.createOrUpdateAsync(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Creates or updates schemas from descriptor source.createOrUpdateAsync(org.infinispan.protostream.schema.Schema schema) Non-blocking version ofcreateOrUpdate(Schema)createOrUpdateAsync(org.infinispan.protostream.schema.Schema schema, boolean force) Non-blocking version ofcreateOrUpdate(Schema, boolean)default booleanChecks if the schema exists.existsAsync(String schemaName) Non-blocking version ofexists(String)default Optional<org.infinispan.protostream.schema.Schema> Returns the schema by name.CompletionStage<Optional<org.infinispan.protostream.schema.Schema>> Non-blocking version ofget(String)Deletes a schema.Deletes a schema with optional force.removeAsync(String schemaName) Non-blocking version ofremove(String)removeAsync(String schemaName, boolean force) Non-blocking version ofremove(String, boolean)default RemoteSchemasAdmin.SchemaErrorsReturns all schema errors.Non-blocking version ofretrieveAllSchemaErrors()retrieveError(String schemaName) Returns the schema error, if present.retrieveErrorAsync(String schemaName) Non-blocking version ofretrieveError(String)default Map<String, RemoteSchemasAdmin.SchemaOpResult> update(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Updates schemas from a descriptor source.update(org.infinispan.protostream.schema.Schema schema) Updates an existing schema.update(org.infinispan.protostream.schema.Schema schema, boolean force) Updates an existing schema with optional force.updateAsync(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Non-blocking version ofupdate(FileDescriptorSource)updateAsync(org.infinispan.protostream.schema.Schema schema) Non-blocking version ofupdate(Schema)updateAsync(org.infinispan.protostream.schema.Schema schema, boolean force) Non-blocking version ofupdate(Schema, boolean)
-
Method Details
-
get
-
getAsync
Non-blocking version ofget(String) -
retrieveError
-
retrieveErrorAsync
Non-blocking version ofretrieveError(String) -
retrieveAllSchemaErrors
Returns all schema errors.- Returns:
- all schema errors
-
retrieveAllSchemaErrorsAsync
CompletionStage<RemoteSchemasAdmin.SchemaErrors> retrieveAllSchemaErrorsAsync()Non-blocking version ofretrieveAllSchemaErrors() -
create
Creates a new schema.- Parameters:
schema- the schema to create- Returns:
RemoteSchemasAdmin.SchemaOpResultcontaining the op resultRemoteSchemasAdmin.SchemaOpResultType.CREATED,RemoteSchemasAdmin.SchemaOpResultType.NONEand the schema validation error, if such exists
-
createAsync
CompletionStage<RemoteSchemasAdmin.SchemaOpResult> createAsync(org.infinispan.protostream.schema.Schema schema) Non-blocking version ofcreate(Schema) -
create
default Map<String, RemoteSchemasAdmin.SchemaOpResult> create(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Creates schemas from a descriptor source.- Parameters:
fileDescriptorSource- descriptor source- Returns:
- map of schema names to results
-
createAsync
CompletionStage<Map<String, RemoteSchemasAdmin.SchemaOpResult>> createAsync(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Non-blocking version ofcreate(FileDescriptorSource) -
update
Updates an existing schema. Retrieves the current schema value. If the schema has changed by the time the update occurs, the update is skipped. This prevents overwriting changes made by another node.- Parameters:
schema- the schema to update- Returns:
RemoteSchemasAdmin.SchemaOpResultcontaining the op resultRemoteSchemasAdmin.SchemaOpResultType.UPDATED,RemoteSchemasAdmin.SchemaOpResultType.NONEand the schema validation error, if such exists
-
update
default RemoteSchemasAdmin.SchemaOpResult update(org.infinispan.protostream.schema.Schema schema, boolean force) Updates an existing schema with optional force. If force=false, retrieves the current schema value. If the schema has changed by the time the update occurs, the update is skipped. This prevents overwriting changes made by another node. If force=true, the update is done on every case.- Parameters:
schema- the schema to updateforce- , if true checks the version of the schema- Returns:
RemoteSchemasAdmin.SchemaOpResultcontaining the op resultRemoteSchemasAdmin.SchemaOpResultType.UPDATED,RemoteSchemasAdmin.SchemaOpResultType.NONEand the schema validation error, if such exists
-
updateAsync
default CompletionStage<RemoteSchemasAdmin.SchemaOpResult> updateAsync(org.infinispan.protostream.schema.Schema schema) Non-blocking version ofupdate(Schema) -
updateAsync
CompletionStage<RemoteSchemasAdmin.SchemaOpResult> updateAsync(org.infinispan.protostream.schema.Schema schema, boolean force) Non-blocking version ofupdate(Schema, boolean) -
update
default Map<String, RemoteSchemasAdmin.SchemaOpResult> update(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Updates schemas from a descriptor source.- Parameters:
fileDescriptorSource- descriptor source- Returns:
- map of schema names to results
-
updateAsync
CompletionStage<Map<String, RemoteSchemasAdmin.SchemaOpResult>> updateAsync(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Non-blocking version ofupdate(FileDescriptorSource) -
createOrUpdate
default RemoteSchemasAdmin.SchemaOpResult createOrUpdate(org.infinispan.protostream.schema.Schema schema) Creates or updates a schema.- Parameters:
schema- the schema to create or update- Returns:
RemoteSchemasAdmin.SchemaOpResultcontaining the op resultRemoteSchemasAdmin.SchemaOpResultType.CREATED,RemoteSchemasAdmin.SchemaOpResultType.UPDATED, orRemoteSchemasAdmin.SchemaOpResultType.NONEand the schema validation error, if such exists
-
createOrUpdate
default RemoteSchemasAdmin.SchemaOpResult createOrUpdate(org.infinispan.protostream.schema.Schema schema, boolean force) Creates or updates a schema. If force=false, retrieves the current schema value. If the schema has changed by the time the operation occurs, the creation or the update is skipped. This prevents overwriting changes made by another node. If force=true, the creation or the update is done on every case.- Parameters:
schema- the schema to create or updateforce- force the schema create or update- Returns:
RemoteSchemasAdmin.SchemaOpResultcontaining the op resultRemoteSchemasAdmin.SchemaOpResultType.CREATED,RemoteSchemasAdmin.SchemaOpResultType.UPDATED, orRemoteSchemasAdmin.SchemaOpResultType.NONEand the schema validation error, if such exists
-
createOrUpdateAsync
default CompletionStage<RemoteSchemasAdmin.SchemaOpResult> createOrUpdateAsync(org.infinispan.protostream.schema.Schema schema) Non-blocking version ofcreateOrUpdate(Schema) -
createOrUpdateAsync
CompletionStage<RemoteSchemasAdmin.SchemaOpResult> createOrUpdateAsync(org.infinispan.protostream.schema.Schema schema, boolean force) Non-blocking version ofcreateOrUpdate(Schema, boolean) -
createOrUpdate
default Map<String, RemoteSchemasAdmin.SchemaOpResult> createOrUpdate(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Non-blocking version ofcreateOrUpdate(FileDescriptorSource) -
createOrUpdateAsync
CompletionStage<Map<String, RemoteSchemasAdmin.SchemaOpResult>> createOrUpdateAsync(org.infinispan.protostream.FileDescriptorSource fileDescriptorSource) Creates or updates schemas from descriptor source.- Parameters:
fileDescriptorSource- source of schema descriptors- Returns:
- map of schema names to results
-
remove
Deletes a schema. Does not force deletion. If the method is invoked while a cache already holds a reference to a schema entity, an exception is thrown.- Parameters:
schemaName- schema name- Returns:
RemoteSchemasAdmin.SchemaOpResultType.DELETEDif deleted,RemoteSchemasAdmin.SchemaOpResultType.NONEif not found- Throws:
org.infinispan.api.exception.InfinispanException- if deletion is blocked by cache dependencies
-
remove
Deletes a schema with optional force. If the method is invoked while a cache already holds a reference to a schema entity, an exception is thrown if force=false. Setting force=true bypasses this check and deletes the schema, if such exists.- Parameters:
schemaName- schema nameforce- if true, bypasses dependency checks- Returns:
RemoteSchemasAdmin.SchemaOpResultType.DELETEDif deleted,RemoteSchemasAdmin.SchemaOpResultType.NONEif not found- Throws:
org.infinispan.api.exception.InfinispanException- if not forced and schema is in use
-
removeAsync
Non-blocking version ofremove(String) -
removeAsync
Non-blocking version ofremove(String, boolean) -
exists
Checks if the schema exists.- Parameters:
schemaName- schema name- Returns:
- true if exists, false otherwise
-
existsAsync
Non-blocking version ofexists(String)
-