You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 23, 2025. It is now read-only.
rjrudin edited this page Mar 14, 2018
·
1 revision
QueryBatcherTemplate is a Spring-style Template class that simplifies common operations involving a QueryBatcher. A QueryBatcherTemplate depends on an instance of DatabaseClient, and then you can configure it and call the method that matches your use case. Example:
QueryBatcherTemplate t = new QueryBatcherTemplate(databaseClient);
t.setThreadCount(32); // defaults to 8
t.setBatchSize(50); // defaults to 100
t.setApplyConsistentSnapshot(true); // defaults to true
t.setAwaitCompletion(true); // defaults to true
t.applyOnCollections(someListener, "collection1", "collection2");
t.applyOnUriPattern(someOtherListener, "**some-pattern*.xml"); // uses cts:uri-match under the hood
In addition to QueryBatcherTemplate, ml-javaclient-util provides implementations of the QueryBatchListener interface for common use cases. Implementations currently exist for adding, removing, setting, and deleting collections, and for adding, removing, and setting permissions.