Skip to content

Commit 182c8f0

Browse files
committed
fix: java
1 parent f810f3c commit 182c8f0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

templates/java/api_helpers.mustache

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,25 @@ public <T> List<WatchResponse> saveObjectsWithTransformation(String indexName, I
776776
return saveObjectsWithTransformation(indexName, objects, null);
777777
}
778778
779+
/**
780+
* Helper: Similar to the `saveObjects` method but requires a Push connector
781+
* (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/)
782+
* to be created first, in order to transform records before indexing them to Algolia. The
783+
* `region` must have been passed to the client instantiation method.
784+
*
785+
* @param indexName The `indexName` to replace `objects` in.
786+
* @param objects The array of `objects` to store in the given Algolia `indexName`.
787+
* @param waitForTasks - Whether or not we should wait until every `batch` tasks has been
788+
* processed, this operation may slow the total execution time of this method but is more
789+
* reliable.
790+
* @throws AlgoliaRetryException When the retry has failed on all hosts
791+
* @throws AlgoliaApiException When the API sends an http error code
792+
* @throws AlgoliaRuntimeException When an error occurred during the serialization
793+
*/
794+
public <T> List<WatchResponse> saveObjectsWithTransformation(String indexName, Iterable<T> objects, boolean waitForTasks) {
795+
return saveObjectsWithTransformation(indexName, objects, waitForTasks, null);
796+
}
797+
779798
/**
780799
* Helper: Similar to the `saveObjects` method but requires a Push connector
781800
* (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/)

0 commit comments

Comments
 (0)