This repository was archived by the owner on Sep 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
DMSDK Support
rjrudin edited this page Aug 13, 2017
·
5 revisions
Version 3.0.0 of ml-javaclient-util includes support for the new Data Movement SDK in version 4 of the MarkLogic Java Client API.
The main class for this support is QueryBatcherTemplate, 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.