@@ -940,6 +940,31 @@ default ListConsumerGroupOffsetsResult listConsumerGroupOffsets(Map<String, List
940
940
return listConsumerGroupOffsets (groupSpecs , new ListConsumerGroupOffsetsOptions ());
941
941
}
942
942
943
+ /**
944
+ * List the Streams group offsets available in the cluster for the specified Streams groups.
945
+ *
946
+ * <em>Note</em>: this method effectively does the same as the corresponding consumer group method {@link Admin#listConsumerGroupOffsets} does.
947
+ *
948
+ * @param groupSpecs Map of Streams group ids to a spec that specifies the topic partitions of the group to list offsets for.
949
+ *
950
+ * @param options The options to use when listing the Streams group offsets.
951
+ * @return The ListStreamsGroupOffsetsResult
952
+ */
953
+ ListStreamsGroupOffsetsResult listStreamsGroupOffsets (Map <String , ListStreamsGroupOffsetsSpec > groupSpecs , ListStreamsGroupOffsetsOptions options );
954
+
955
+ /**
956
+ * List the Streams group offsets available in the cluster for the specified groups with the default options.
957
+ * <p>
958
+ * This is a convenience method for
959
+ * {@link #listStreamsGroupOffsets(Map, ListStreamsGroupOffsetsOptions)} with default options.
960
+ *
961
+ * @param groupSpecs Map of Streams group ids to a spec that specifies the topic partitions of the group to list offsets for.
962
+ * @return The ListStreamsGroupOffsetsResult.
963
+ */
964
+ default ListStreamsGroupOffsetsResult listStreamsGroupOffsets (Map <String , ListStreamsGroupOffsetsSpec > groupSpecs ) {
965
+ return listStreamsGroupOffsets (groupSpecs , new ListStreamsGroupOffsetsOptions ());
966
+ }
967
+
943
968
/**
944
969
* Delete consumer groups from the cluster.
945
970
*
@@ -957,6 +982,25 @@ default DeleteConsumerGroupsResult deleteConsumerGroups(Collection<String> group
957
982
return deleteConsumerGroups (groupIds , new DeleteConsumerGroupsOptions ());
958
983
}
959
984
985
+ /**
986
+ * Delete Streams groups from the cluster.
987
+ *
988
+ * <em>Note</em>: this method effectively does the same as the corresponding consumer group method {@link Admin#deleteConsumerGroups} does.
989
+ *
990
+ * @param options The options to use when deleting a Streams group.
991
+ * @return The DeleteStreamsGroupsResult.
992
+ */
993
+ DeleteStreamsGroupsResult deleteStreamsGroups (Collection <String > groupIds , DeleteStreamsGroupsOptions options );
994
+
995
+ /**
996
+ * Delete Streams groups from the cluster with the default options.
997
+ *
998
+ * @return The DeleteStreamsGroupResult.
999
+ */
1000
+ default DeleteStreamsGroupsResult deleteStreamsGroups (Collection <String > groupIds ) {
1001
+ return deleteStreamsGroups (groupIds , new DeleteStreamsGroupsOptions ());
1002
+ }
1003
+
960
1004
/**
961
1005
* Delete committed offsets for a set of partitions in a consumer group. This will
962
1006
* succeed at the partition level only if the group is not actively subscribed
@@ -980,6 +1024,31 @@ default DeleteConsumerGroupOffsetsResult deleteConsumerGroupOffsets(String group
980
1024
return deleteConsumerGroupOffsets (groupId , partitions , new DeleteConsumerGroupOffsetsOptions ());
981
1025
}
982
1026
1027
+ /**
1028
+ * Delete committed offsets for a set of partitions in a Streams group. This will
1029
+ * succeed at the partition level only if the group is not actively subscribed
1030
+ * to the corresponding topic.
1031
+ *
1032
+ * <em>Note</em>: this method effectively does the same as the corresponding consumer group method {@link Admin#deleteConsumerGroupOffsets} does.
1033
+ *
1034
+ * @param options The options to use when deleting offsets in a Streams group.
1035
+ * @return The DeleteStreamsGroupOffsetsResult.
1036
+ */
1037
+ DeleteStreamsGroupOffsetsResult deleteStreamsGroupOffsets (String groupId ,
1038
+ Set <TopicPartition > partitions ,
1039
+ DeleteStreamsGroupOffsetsOptions options );
1040
+
1041
+ /**
1042
+ * Delete committed offsets for a set of partitions in a Streams group with the default
1043
+ * options. This will succeed at the partition level only if the group is not actively
1044
+ * subscribed to the corresponding topic.
1045
+ *
1046
+ * @return The DeleteStreamsGroupOffsetsResult.
1047
+ */
1048
+ default DeleteStreamsGroupOffsetsResult deleteStreamsGroupOffsets (String groupId , Set <TopicPartition > partitions ) {
1049
+ return deleteStreamsGroupOffsets (groupId , partitions , new DeleteStreamsGroupOffsetsOptions ());
1050
+ }
1051
+
983
1052
/**
984
1053
* List the groups available in the cluster with the default options.
985
1054
*
@@ -1213,6 +1282,34 @@ default AlterConsumerGroupOffsetsResult alterConsumerGroupOffsets(String groupId
1213
1282
*/
1214
1283
AlterConsumerGroupOffsetsResult alterConsumerGroupOffsets (String groupId , Map <TopicPartition , OffsetAndMetadata > offsets , AlterConsumerGroupOffsetsOptions options );
1215
1284
1285
+ /**
1286
+ * <p>Alters offsets for the specified group. In order to succeed, the group must be empty.
1287
+ *
1288
+ * <p>This is a convenience method for {@link #alterStreamsGroupOffsets(String, Map, AlterStreamsGroupOffsetsOptions)} with default options.
1289
+ * See the overload for more details.
1290
+ *
1291
+ * @param groupId The group for which to alter offsets.
1292
+ * @param offsets A map of offsets by partition with associated metadata.
1293
+ * @return The AlterOffsetsResult.
1294
+ */
1295
+ default AlterStreamsGroupOffsetsResult alterStreamsGroupOffsets (String groupId , Map <TopicPartition , OffsetAndMetadata > offsets ) {
1296
+ return alterStreamsGroupOffsets (groupId , offsets , new AlterStreamsGroupOffsetsOptions ());
1297
+ }
1298
+
1299
+ /**
1300
+ * <p>Alters offsets for the specified group. In order to succeed, the group must be empty.
1301
+ *
1302
+ * <p>This operation is not transactional so it may succeed for some partitions while fail for others.
1303
+ *
1304
+ * <em>Note</em>: this method effectively does the same as the corresponding consumer group method {@link Admin#alterConsumerGroupOffsets} does.
1305
+ *
1306
+ * @param groupId The group for which to alter offsets.
1307
+ * @param offsets A map of offsets by partition with associated metadata. Partitions not specified in the map are ignored.
1308
+ * @param options The options to use when altering the offsets.
1309
+ * @return The AlterOffsetsResult.
1310
+ */
1311
+ AlterStreamsGroupOffsetsResult alterStreamsGroupOffsets (String groupId , Map <TopicPartition , OffsetAndMetadata > offsets , AlterStreamsGroupOffsetsOptions options );
1312
+
1216
1313
/**
1217
1314
* <p>List offset for the specified partitions and OffsetSpec. This operation enables to find
1218
1315
* the beginning offset, end offset as well as the offset matching a timestamp in partitions.
0 commit comments