Project

General

Profile

« Previous | Next » 

Revision 57636

Added failedCallback to mdstore plugin invocation

View differences:

ResolverMDStorePlugin.java
9 9
import com.mongodb.client.MongoDatabase;
10 10
import com.mongodb.client.model.*;
11 11
import eu.dnetlib.data.mdstore.modular.action.DoneCallback;
12
import eu.dnetlib.data.mdstore.modular.action.FailedCallback;
12 13
import eu.dnetlib.data.mdstore.modular.action.MDStorePlugin;
13 14
import eu.dnetlib.data.mdstore.modular.connector.MDStoreDao;
14 15
import eu.dnetlib.data.mdstore.modular.mongodb.MDStoreTransactionManagerImpl;
......
31 32
/**
32 33
 * Created by sandro on 9/9/16.
33 34
 */
34
public class 	ResolverMDStorePlugin implements MDStorePlugin {
35
public class ResolverMDStorePlugin implements MDStorePlugin {
35 36

  
36 37
	private static final Log log = LogFactory.getLog(ResolverMDStorePlugin.class);
37 38
	public static DBObject DONE = new BasicDBObject();
......
62 63
	}
63 64

  
64 65
	@Override
65
	public void run(final MDStoreDao dao, final Map<String, String> params, final DoneCallback doneCallback) throws MDStoreServiceException {
66

  
66
	public void run(final MDStoreDao dao, final Map<String, String> params, final DoneCallback doneCallback, final FailedCallback failedCallback) {
67 67
		try {
68

  
69 68
			final String id = params.get("mdStoreId");
70 69
			final boolean offline = "true".equals(params.get("offline"));
71 70

  
......
154 153
            doneCallback.call(params);
155 154
		} catch (Throwable e) {
156 155
            log.error(e);
157
            throw new MDStoreServiceException("Error on resolving records ", e);
156
            throw new RuntimeException("Error on resolving records ", e);
158 157
		}
159 158
	}
160 159

  

Also available in: Unified diff