Class ClientSchemaAndIndexesGetRequest
java.lang.Object
org.apache.ignite.client.handler.requests.table.ClientSchemaAndIndexesGetRequest
Client request: fetch a table's latest schema together with its full index set, resolved at a single catalog version.
Adding an index bumps the catalog version but not the table's schema version, so the schema-version handshake
cannot describe the index set. This op returns both from one catalog snapshot, keyed by catalog version, so the
client can build index-shaped requests (e.g. PREPARE_FOR_INSERT) against a known, mutually consistent view.
Wire request (in order):
inttable id;intcatalog version to resolve at, orClientCommon.LATEST_CATALOG_VERSION(-1) for the latest (active-at-current-time) catalog.
Wire response (in order):
intresolved catalog version (echoes the request, or the active version when-1was sent);- the table's latest schema as of that catalog version, encoded by
ClientTableCommon.writeSchema(org.apache.ignite.internal.client.proto.ClientMessagePacker, int, org.apache.ignite.internal.schema.SchemaDescriptor):intschema version,intcolumn count, then per column a property count and its properties, then the write mode; intindex count, then per index (in ascending index-id order):intproperty count (leading scalar properties, currently just the id — a newer server may append more that older clients skip),intindex id,intcolumn count, then that manystringindexed column names in index column order.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<ResponseWriter>process(org.apache.ignite.internal.client.proto.ClientMessageUnpacker in, org.apache.ignite.internal.table.IgniteTablesInternal tables, org.apache.ignite.internal.catalog.CatalogService catalogService, org.apache.ignite.internal.schema.SchemaSyncService schemaSyncService, org.apache.ignite.internal.hlc.ClockService clockService) Processes the request.
-
Constructor Details
-
ClientSchemaAndIndexesGetRequest
public ClientSchemaAndIndexesGetRequest()
-
-
Method Details
-
process
public static CompletableFuture<ResponseWriter> process(org.apache.ignite.internal.client.proto.ClientMessageUnpacker in, org.apache.ignite.internal.table.IgniteTablesInternal tables, org.apache.ignite.internal.catalog.CatalogService catalogService, org.apache.ignite.internal.schema.SchemaSyncService schemaSyncService, org.apache.ignite.internal.hlc.ClockService clockService) Processes the request.- Parameters:
in- Unpacker.tables- Ignite tables.catalogService- Catalog service.schemaSyncService- Schema sync service.clockService- Clock service.- Returns:
- Future.
-