11package io .ably .lib .objects ;
22
3- import io .ably .lib .objects .batch .BatchContextBuilder ;
43import io .ably .lib .types .Callback ;
4+ import org .jetbrains .annotations .Blocking ;
5+ import org .jetbrains .annotations .NonBlocking ;
56import org .jetbrains .annotations .NotNull ;
67
78
@@ -25,18 +26,10 @@ public interface LiveObjects {
2526 *
2627 * @return the root LiveMap instance.
2728 */
29+ @ Blocking
2830 @ NotNull
2931 LiveMap getRoot ();
3032
31- /**
32- * Initiates a batch operation and provides a BatchContext through a callback.
33- * Provides access to the synchronous write API for Objects that can be used to batch multiple operations
34- * together in a single channel message.
35- *
36- * @param batchContextCallback the builder to configure the batch operation.
37- */
38- void batch (@ NotNull BatchContextBuilder batchContextCallback );
39-
4033 /**
4134 * Creates a new LiveMap based on an existing LiveMap.
4235 * Send a MAP_CREATE operation to the realtime system to create a new map object in the pool.
@@ -47,6 +40,7 @@ public interface LiveObjects {
4740 * @param liveMap the existing LiveMap to base the new LiveMap on.
4841 * @return the newly created LiveMap instance.
4942 */
43+ @ Blocking
5044 @ NotNull
5145 LiveMap createMap (@ NotNull LiveMap liveMap );
5246
@@ -60,6 +54,7 @@ public interface LiveObjects {
6054 * @param liveCounter the LiveCounter to base the new LiveMap on.
6155 * @return the newly created LiveMap instance.
6256 */
57+ @ Blocking
6358 @ NotNull
6459 LiveMap createMap (@ NotNull LiveCounter liveCounter );
6560
@@ -73,6 +68,7 @@ public interface LiveObjects {
7368 * @param map the Java Map to base the new LiveMap on.
7469 * @return the newly created LiveMap instance.
7570 */
71+ @ Blocking
7672 @ NotNull
7773 LiveMap createMap (@ NotNull Map <String , Object > map );
7874
@@ -86,6 +82,7 @@ public interface LiveObjects {
8682 * @param initialValue the initial value of the LiveCounter.
8783 * @return the newly created LiveCounter instance.
8884 */
85+ @ Blocking
8986 @ NotNull
9087 LiveCounter createCounter (@ NotNull Long initialValue );
9188
@@ -97,18 +94,9 @@ public interface LiveObjects {
9794 *
9895 * @param callback the callback to handle the result or error.
9996 */
97+ @ NonBlocking
10098 void getRootAsync (@ NotNull Callback <@ NotNull LiveMap > callback );
10199
102- /**
103- * Initiates a batch operation asynchronously.
104- * Provides access to the synchronous write API for Objects that can be used to batch multiple operations
105- * together in a single channel message.
106- *
107- * @param batchContextCallback the builder to configure the batch operation.
108- * @param callback the Callback to handle the completion or error of the batch operation.
109- */
110- void batchAsync (@ NotNull BatchContextBuilder batchContextCallback , @ NotNull Callback <Void > callback );
111-
112100 /**
113101 * Asynchronously creates a new LiveMap based on an existing LiveMap.
114102 * Send a MAP_CREATE operation to the realtime system to create a new map object in the pool.
@@ -119,6 +107,7 @@ public interface LiveObjects {
119107 * @param liveMap the existing LiveMap to base the new LiveMap on.
120108 * @param callback the callback to handle the result or error.
121109 */
110+ @ NonBlocking
122111 void createMapAsync (@ NotNull LiveMap liveMap , @ NotNull Callback <@ NotNull LiveMap > callback );
123112
124113 /**
@@ -131,6 +120,7 @@ public interface LiveObjects {
131120 * @param liveCounter the LiveCounter to base the new LiveMap on.
132121 * @param callback the callback to handle the result or error.
133122 */
123+ @ NonBlocking
134124 void createMapAsync (@ NotNull LiveCounter liveCounter , @ NotNull Callback <@ NotNull LiveMap > callback );
135125
136126 /**
@@ -143,6 +133,7 @@ public interface LiveObjects {
143133 * @param map the Java Map to base the new LiveMap on.
144134 * @param callback the callback to handle the result or error.
145135 */
136+ @ NonBlocking
146137 void createMapAsync (@ NotNull Map <String , Object > map , @ NotNull Callback <@ NotNull LiveMap > callback );
147138
148139 /**
@@ -155,5 +146,6 @@ public interface LiveObjects {
155146 * @param initialValue the initial value of the LiveCounter.
156147 * @param callback the callback to handle the result or error.
157148 */
149+ @ NonBlocking
158150 void createCounterAsync (@ NotNull Long initialValue , @ NotNull Callback <@ NotNull LiveCounter > callback );
159151}
0 commit comments