Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 81abb44

Browse files
committed
Moving docs to Wiki
Fixing README links
1 parent 74401da commit 81abb44

File tree

1 file changed

+4
-39
lines changed

1 file changed

+4
-39
lines changed

README.md

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,8 @@ the [MarkLogic Java Client API](http://docs.marklogic.com/guide/java). Those fea
1313
This is a lower-level library that is primarily used via [ml-app-deployer](https://github.com/rjrudin/ml-app-deployer)
1414
and [ml-gradle](https://github.com/rjrudin/ml-gradle) and [ml-junit](https://github.com/rjrudin/ml-junit). But you can use it by itself too.
1515

16-
### Loading Modules
16+
See the following Wiki pages for more information on some of the main features in this library:
1717

18-
Here's a sample of loading modules - though it's best to look at the aforementioned projects to see all the ways this can be done:
19-
20-
DatabaseClient client = DatabaseClientFactory.newClient(...); // Use the ML Java Client API
21-
AssetFileLoader assetFileLoader = new AssetFileLoader(client); // Uses the REST API to load asset modules
22-
DefaultModulesLoader modulesLoader = new DefaultModulesLoader(assetLoader);
23-
File modulesDir = new File("src/main/ml-modules");
24-
ModulesFinder modulesFinder = new DefaultModulesFinder(); // Allows for adjusting where modules are stored on a filesystem
25-
modulesLoader.loadModules(modulesDir, modulesFinder, client);
26-
27-
### Parallelized batch writes
28-
29-
The [BatchWriter](https://github.com/rjrudin/ml-javaclient-util/tree/master/src/main/java/com/marklogic/client/batch) library
30-
was created primarily for applications using [marklogic-spring-batch](https://github.com/sastafford/marklogic-spring-batch). But
31-
it can be used in any environment. It provides the following features:
32-
33-
1. Uses Spring's [TaskExecutor library](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html) for parallelizing writes
34-
1. Supports writes via the REST API or XCC
35-
36-
Via Spring's TaskExecutor library, you can essentially throw an infinite number of documents at this interface. The library
37-
will default to a sensible implementation of [ThreadPoolTaskExecutor](http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/scheduling/concurrent/ThreadPoolTaskExecutor.html),
38-
but you can override that with any TaskExecutor implementation you like.
39-
40-
Once MarkLogic 9 is available, an implementation will be used that depends on the new Data Movement SDK, which is being
41-
added to the MarkLogic Java Client API.
42-
43-
Here's a sample using two DatabaseClient instances:
44-
45-
// This is all basic Java Client API stuff
46-
DatabaseClient client1 = DatabaseClientFactory.newClient("host1", ...);
47-
DatabaseClient client2 = DatabaseClientFactory.newClient("host2", ...);
48-
DocumentWriteOperation doc1 = new DocumentWriteOperationImpl("test1.xml", ...);
49-
DocumentWriteOperation doc2 = new DocumentWriteOperationImpl("test2.xml", ...);
50-
51-
// Here's how BatchWriter works
52-
BatchWriter writer = new RestBatchWriter(Arrays.asList(client1, client2));
53-
writer.initialize();
54-
writer.write(Arrays.asList(doc1, doc2));
55-
writer.waitForCompletion();
18+
1. [Loading files](https://github.com/marklogic-community/ml-javaclient-util/wiki/Loading-files), including modules
19+
1. [DMSDK Support](https://github.com/marklogic-community/ml-javaclient-util/wiki/DMSDK-Support)
20+
1. [Writing documents in batches](https://github.com/marklogic-community/ml-javaclient-util/wiki/Writing-documents-in-batches)

0 commit comments

Comments
 (0)