This is an automated email from the ASF dual-hosted git repository.

apkhmv pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new f665bb3720 IGNITE-22658 Update IgniteCatalog javadoc (#4096)
f665bb3720 is described below

commit f665bb37200119c768d0a59146060785ac9192da
Author: Maksim Myskov <[email protected]>
AuthorDate: Mon Jul 22 18:40:54 2024 +0300

    IGNITE-22658 Update IgniteCatalog javadoc (#4096)
---
 docs/_docs/developers-guide/java-to-tables.adoc       | 10 ++++------
 .../java/org/apache/ignite/catalog/IgniteCatalog.java | 19 ++++++++++++-------
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/docs/_docs/developers-guide/java-to-tables.adoc 
b/docs/_docs/developers-guide/java-to-tables.adoc
index 5671c40c87..0fdffb5e7c 100644
--- a/docs/_docs/developers-guide/java-to-tables.adoc
+++ b/docs/_docs/developers-guide/java-to-tables.adoc
@@ -72,7 +72,7 @@ class PojoValue {
 }
 
 // execute
-ignite.catalog().create(PojoKey.class, PojoValue.class).execute();
+ignite.catalog().create(PojoKey.class, PojoValue.class);
 
 // access
 ignite.tables().table("kv_pojo_test").keyValueView(PojoKey.class, 
PojoValue.class)
@@ -137,7 +137,7 @@ class Pojo {
 }
 
 // execute
-ignite.catalog().create(Pojo.class).execute();
+ignite.catalog().create(Pojo.class);
 
 // access
 ignite.tables().table("pojo_test").recordView(Pojo.class)
@@ -168,8 +168,7 @@ class Pojo {
 
 ignite.catalog()
   .create(ZoneDefinition.builder("zone_test")
-    .partitions(2))
-  .execute();
+    .partitions(2));
 
 ignite.catalog()
   .create(TableDefinition.builder("pojo_test")
@@ -177,8 +176,7 @@ ignite.catalog()
        .colocateBy("id", "id_str")
        .zone("zone_test")
     .record(Pojo.class) // .key(Key.class).value(Value.class)
-    .build())
-  .execute();
+    .build());
 ----
 
 == Next Steps
diff --git 
a/modules/api/src/main/java/org/apache/ignite/catalog/IgniteCatalog.java 
b/modules/api/src/main/java/org/apache/ignite/catalog/IgniteCatalog.java
index 582bdb7e4b..c4d37d9219 100644
--- a/modules/api/src/main/java/org/apache/ignite/catalog/IgniteCatalog.java
+++ b/modules/api/src/main/java/org/apache/ignite/catalog/IgniteCatalog.java
@@ -30,7 +30,7 @@ import org.apache.ignite.table.Table;
  *    private static class Value {
  *        String val;
  *    }
- *    ignite.catalog().create(Integer.class, Value.class).execute();
+ *    ignite.catalog().createTable(Integer.class, Value.class);
  * </pre>
  * This is equivalent to executing the following statement:
  * <pre>
@@ -46,7 +46,7 @@ import org.apache.ignite.table.Table;
  *            )
  *            .primaryKey("id")
  *            .build();
- *    ignite.catalog().createTable(table).execute();
+ *    ignite.catalog().createTable(table);
  * </pre>
  * This is an example of the table created from simple annotated record class.
  * <pre>
@@ -67,7 +67,7 @@ import org.apache.ignite.table.Table;
  *            .columns(column("id", INTEGER))
  *            .primaryKey("id")
  *            .build();
- *    ignite.catalog().createTable(table).execute();
+ *    ignite.catalog().createTable(table);
  * </pre>
  * Here's an example of more complex annotations including zones, colocation 
and indexes:
  * <pre>
@@ -127,15 +127,15 @@ import org.apache.ignite.table.Table;
  *                    column("id_str", ColumnType.varchar(20)),
  *                    column("f_name", 
ColumnType.varchar(20).notNull().defaultValue("a")),
  *                    column("l_name", ColumnType.VARCHAR),
- *                    column("str", ColumnType.VARCHAR),
+ *                    column("str", ColumnType.VARCHAR)
  *            )
  *            .primaryKey("id", "id_str")
  *            .colocateBy("id", "id_str")
  *            .zone("zone_test")
- *            .index("ix_pojo", IndexType.DEFAULT, column("f_name"), 
column("l_name").desc())
+ *            .index("ix_pojo", IndexType.DEFAULT, 
ColumnSorted.column("f_name"), ColumnSorted.column("l_name", SortOrder.DESC))
  *            .build();
- *    ignite.catalog().createZone(zone).execute();
- *    ignite.catalog().createTable(table).execute();
+ *    ignite.catalog().createZone(zone);
+ *    ignite.catalog().createTable(table);
  * </pre>
  *
  *
@@ -198,6 +198,11 @@ public interface IgniteCatalog {
      */
     CompletableFuture<Void> createZoneAsync(ZoneDefinition definition);
 
+    /**
+     * Creates a {@code CREATE ZONE} query object from the zone definition.
+     *
+     * @param definition Zone definition.
+     */
     void createZone(ZoneDefinition definition);
 
     /**

Reply via email to