fix merge conflicts

This commit is contained in:
Roberto Cirillo 2021-05-14 17:06:24 +02:00
parent 1ff761db9c
commit 763b30fa04
6 changed files with 10 additions and 10 deletions

View File

@ -381,7 +381,7 @@ public abstract class Operation {
this.user = user; this.user = user;
} }
protected TransportManager getTransport(MyFile myFile) { protected TransportManager getTransport(RequestObject myFile) {
// if(Objects.isNull(transport)) { // if(Objects.isNull(transport)) {
TransportManagerFactory tmf= new TransportManagerFactory(server, user, password); TransportManagerFactory tmf= new TransportManagerFactory(server, user, password);
transport=tmf.getTransport(transport, backendType, myFile.getGcubeMemoryType(), dbNames, myFile.getWriteConcern(), myFile.getReadPreference()); transport=tmf.getTransport(transport, backendType, myFile.getGcubeMemoryType(), dbNames, myFile.getWriteConcern(), myFile.getReadPreference());

View File

@ -38,7 +38,7 @@ public abstract class TransportManager {
* @param user * @param user
* @param token api token if is required by backend * @param token api token if is required by backend
*/ */
public abstract void initBackend(String[] server, String user, String pass, MemoryType memoryType, String[] dbNames, String writeConcern, String readConcern, String token, String region); public abstract void initBackend(String[] server, String user, String pass, MemoryType memoryType, String[] dbNames, String writeConcern, String readConcern);
/** /**

View File

@ -57,7 +57,7 @@ public class TransportManagerFactory {
return transport; return transport;
} }
private TransportManager load(String backendType, MemoryType memoryType, String[] dbNames, String writeConcern, String readConcern, String token, String region){ private TransportManager load(String backendType, MemoryType memoryType, String[] dbNames, String writeConcern, String readConcern){
ServiceLoader<TransportManager> loader = ServiceLoader.load(TransportManager.class); ServiceLoader<TransportManager> loader = ServiceLoader.load(TransportManager.class);
Iterator<TransportManager> iterator = loader.iterator(); Iterator<TransportManager> iterator = loader.iterator();
List<TransportManager> impls = new ArrayList<TransportManager>(); List<TransportManager> impls = new ArrayList<TransportManager>();
@ -69,11 +69,11 @@ public class TransportManagerFactory {
// System.out.println("size: "+implementationCounted); // System.out.println("size: "+implementationCounted);
if((implementationCounted==0) || backendType.equals(Costants.DEFAULT_TRANSPORT_MANAGER)){ if((implementationCounted==0) || backendType.equals(Costants.DEFAULT_TRANSPORT_MANAGER)){
logger.info(" 0 implementation found. Load default implementation of TransportManager"); logger.info(" 0 implementation found. Load default implementation of TransportManager");
return new MongoOperationManager(server, user, password, memoryType, dbNames, writeConcern, readConcern, null, null); return new MongoOperationManager(server, user, password, memoryType, dbNames, writeConcern, readConcern);
}else if((implementationCounted==1) && Objects.isNull(backendType)){ }else if((implementationCounted==1) && Objects.isNull(backendType)){
TransportManager tm = impls.get(0); TransportManager tm = impls.get(0);
logger.info("1 implementation of TransportManager found. Load it. "+tm.getName()); logger.info("1 implementation of TransportManager found. Load it. "+tm.getName());
tm.initBackend(server, user, password, memoryType, dbNames, writeConcern, readConcern, token, region); tm.initBackend(server, user, password, memoryType, dbNames, writeConcern, readConcern);
return tm; return tm;
}else{ }else{
logger.info("found "+implementationCounted+" implementations of TransportManager"); logger.info("found "+implementationCounted+" implementations of TransportManager");
@ -81,7 +81,7 @@ public class TransportManagerFactory {
for(TransportManager tm : impls){ for(TransportManager tm : impls){
if(tm.getName().equalsIgnoreCase(backendType)){ if(tm.getName().equalsIgnoreCase(backendType)){
logger.info("Found implementation "+backendType); logger.info("Found implementation "+backendType);
tm.initBackend(server, user, password, memoryType, dbNames, writeConcern, readConcern, token, region); tm.initBackend(server, user, password, memoryType, dbNames, writeConcern, readConcern);
return tm; return tm;
} }
} }

View File

@ -547,7 +547,7 @@ public class MongoIOManager {
destinationFile.put("creationTime", DateUtils.now("dd MM yyyy 'at' hh:mm:ss z")); destinationFile.put("creationTime", DateUtils.now("dd MM yyyy 'at' hh:mm:ss z"));
} }
public DBObject setGenericMoveProperties(MyFile resource, String filename, String dir, public DBObject setGenericMoveProperties(RequestObject resource, String filename, String dir,
String name, DBObject sourcePathMetaCollection) { String name, DBObject sourcePathMetaCollection) {
sourcePathMetaCollection.put("filename", filename); sourcePathMetaCollection.put("filename", filename);
sourcePathMetaCollection.put("type", "file"); sourcePathMetaCollection.put("type", "file");

View File

@ -49,8 +49,8 @@ public class MongoOperationManager extends TransportManager{
protected static String[] dbNames; protected static String[] dbNames;
public MongoOperationManager(String[] server, String user, String password, MemoryType memoryType, String[] dbNames,String writeConcern, String readConcern, String token, String region){ public MongoOperationManager(String[] server, String user, String password, MemoryType memoryType, String[] dbNames,String writeConcern, String readConcern){
initBackend(server,user,password, memoryType,dbNames, writeConcern, readConcern, token, region); initBackend(server,user,password, memoryType,dbNames, writeConcern, readConcern);
} }

View File

@ -175,7 +175,7 @@ public class MoveOperator extends Move {
} }
private DBObject setCommonFields(DBObject sourcePathMetaCollection, MyFile resource, OPERATION op) { private DBObject setCommonFields(DBObject sourcePathMetaCollection, RequestObject resource, OPERATION op) {
String owner=resource.getOwner(); String owner=resource.getOwner();
if(op == null){ if(op == null){
op=resource.getOperationDefinition().getOperation(); op=resource.getOperationDefinition().getOperation();