Skip to content

Commit 6d781df

Browse files
authored
Merge pull request #1692 from marklogic/feature/deprecation-1
MLE-15726 Removed more deprecated stuff
2 parents 7aa40fe + 1267134 commit 6d781df

File tree

25 files changed

+69
-821
lines changed

25 files changed

+69
-821
lines changed

examples/src/main/java/com/marklogic/client/example/cookbook/datamovement/BulkExportToJdbc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void run() throws IOException, SQLException {
142142

143143
// in a production application we could have more elaborate error
144144
// handling here
145-
.onBatchFailure((failedBatch,exception) -> exception.printStackTrace())
145+
.onFailure((failedBatch,exception) -> exception.printStackTrace())
146146
)
147147

148148
// another onUrisReady listener, this one custom, and just for logging

examples/src/main/java/com/marklogic/client/example/cookbook/datamovement/BulkLoadFromJdbcRaw.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public void transform() throws IOException, SQLException {
207207
ApplyTransformListener transformListener = new ApplyTransformListener()
208208
.withTransform(new ServerTransform("BulkLoadFromJdbcRaw"))
209209
.withApplyResult(ApplyTransformListener.ApplyResult.REPLACE)
210-
.onBatchFailure((batch, throwable) -> throwable.printStackTrace());
210+
.onFailure((batch, throwable) -> throwable.printStackTrace());
211211

212212
// add the ApplyTransformListener to the QueryBatcher
213213
qb.onUrisReady(transformListener);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestNamespaces.java

Lines changed: 0 additions & 167 deletions
This file was deleted.

marklogic-client-api/src/main/java/com/marklogic/client/admin/NamespacesManager.java

Lines changed: 0 additions & 83 deletions
This file was deleted.

marklogic-client-api/src/main/java/com/marklogic/client/admin/ServerConfigurationManager.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,6 @@ void writeConfiguration()
160160
* @return a new manager for query options
161161
*/
162162
QueryOptionsManager newQueryOptionsManager();
163-
/**
164-
* Deprecated. To configure namespaces on a MarkLogic server, use Management REST API.
165-
* @return a new manager for namespace bindings
166-
*
167-
* See <a href="https://docs.marklogic.com/REST/management/app-servers">Management REST API</a>
168-
*/
169-
@Deprecated
170-
NamespacesManager newNamespacesManager();
171163
/**
172164
* Creates a manager for listing, reading, writing, and deleting
173165
* resource service extensions.

marklogic-client-api/src/main/java/com/marklogic/client/datamovement/ApplyTransformListener.java

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@
1515
*/
1616
package com.marklogic.client.datamovement;
1717

18-
import com.marklogic.client.impl.DatabaseClientImpl;
18+
import com.marklogic.client.datamovement.impl.QueryBatchImpl;
1919
import com.marklogic.client.document.ServerTransform;
20+
import com.marklogic.client.impl.DatabaseClientImpl;
2021
import com.marklogic.client.impl.RESTServices;
2122
import com.marklogic.client.io.ReaderHandle;
2223
import com.marklogic.client.io.StringHandle;
2324
import com.marklogic.client.util.RequestParameters;
24-
import com.marklogic.client.datamovement.impl.QueryBatchImpl;
25-
2625
import org.slf4j.Logger;
2726
import org.slf4j.LoggerFactory;
2827

2928
import java.io.BufferedReader;
30-
import java.util.*;
29+
import java.util.ArrayList;
30+
import java.util.Arrays;
31+
import java.util.Iterator;
32+
import java.util.List;
3133
import java.util.stream.Collectors;
3234

3335
/**
@@ -93,7 +95,7 @@
9395
* <p>In order to handle such scenarios where we get an empty response, it is
9496
* recommended to add a BatchFailureListener which would take care of apply
9597
* transform failures and retry only for those URIs for which the apply
96-
* transform has failed. If the transform is idempotent, we can just initialize
98+
* transform has failed. If the transform is idempotent, we can just initialize
9799
* the RetryListener of the NoResponseListener by calling
98100
* NoResponseListener.initializeRetryListener(this) and add it to the
99101
* BatchFailureListeners similar to what we have in the other listeners.</p>
@@ -104,7 +106,6 @@ public class ApplyTransformListener implements QueryBatchListener {
104106
private ApplyResult applyResult = ApplyResult.REPLACE;
105107
private List<QueryBatchListener> successListeners = new ArrayList<>();
106108
private List<QueryBatchListener> skippedListeners = new ArrayList<>();
107-
private List<BatchFailureListener<Batch<String>>> failureListeners = new ArrayList<>();
108109
private List<BatchFailureListener<QueryBatch>> queryBatchFailureListeners = new ArrayList<>();
109110

110111
public ApplyTransformListener() {
@@ -176,13 +177,6 @@ public void processEvent(QueryBatch batch) {
176177
}
177178
}
178179
} catch (Throwable t) {
179-
for ( BatchFailureListener<Batch<String>> listener : failureListeners ) {
180-
try {
181-
listener.processFailure(batch, t);
182-
} catch (Throwable t2) {
183-
logger.error("Exception thrown by an onBatchFailure listener", t2);
184-
}
185-
}
186180
for ( BatchFailureListener<QueryBatch> queryBatchFailureListener : queryBatchFailureListeners ) {
187181
try {
188182
queryBatchFailureListener.processFailure(batch, t);
@@ -221,21 +215,6 @@ public ApplyTransformListener onSkipped(QueryBatchListener listener) {
221215
return this;
222216
}
223217

224-
/**
225-
* When a batch fails or a callback throws an Exception, run this listener
226-
* code. Multiple listeners can be registered with this method.
227-
*
228-
* @param listener the code to run when a failure occurs
229-
*
230-
* @return this instance for method chaining
231-
* @deprecated use {@link #onFailure(BatchFailureListener)}
232-
*/
233-
@Deprecated
234-
public ApplyTransformListener onBatchFailure(BatchFailureListener<Batch<String>> listener) {
235-
failureListeners.add(listener);
236-
return this;
237-
}
238-
239218
/**
240219
* When a batch fails or a callback throws an Exception, run this listener
241220
* code. Multiple listeners can be registered with this method.

0 commit comments

Comments
 (0)