Compare commits

...

10 Commits

4 changed files with 48 additions and 23 deletions

View File

@ -1,17 +1,15 @@
# Changelog for storage-manager-core
## [v3.0.0] 2021-09-10
* fix #22164
* fix #21980
* update gcube-bom version
* add close operation on IClient interface
* add check on transport layer instance: if the memory type is not the same, a new transportLayer is instatiated
* move memoryType var from super class TransportManager
* convert BasicDBObject to DBObject the return type used for metadata collections
* One pool for every operation: static Operation class; no mongo close operation
* upgrade mongo-java-driver to 3.12.0
* added input parameter to getSize method in order to be compatible with the needed of s3 client
* moved from version 2.13.1 to 3.0.0-SNAPSHOT
## [v2.9.3-SNAPSHOT] 2022-09-19
* set java to 1.8
## [v2.9.2] 2022-09-07
* restored close() method to IClient
* add slf4j-simple dependency with test scope
* update gcube-bom to 2.0.2
## [v2.9.1] 2022-06-28
* update to version 2.9.1 in order to have a fixed bom in the latest version of the range
## [v2.9.0] 2019-10-19
* SSL enabled

24
pom.xml
View File

@ -8,10 +8,12 @@
</parent>
<groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-core</artifactId>
<version>3.0.0</version>
<!-- <properties> -->
<!-- <distroDirectory>${project.basedir}/distro</distroDirectory> -->
<!-- </properties> -->
<version>2.9.3-SNAPSHOT</version>
<properties>
<distroDirectory>${project.basedir}/distro</distroDirectory>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<scm>
<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
@ -23,7 +25,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-bom</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -53,11 +55,11 @@
<artifactId>commons-codec</artifactId>
<version>1.8</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-simple</artifactId> -->
<!-- <version>1.7.32</version> -->
<!-- <scope>test</scope> -->
<!-- </dependency> -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.32</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -209,6 +209,11 @@ public RemoteResourceComplexInfo getMetaFile();
*/
public void forceClose();
/**
* close the connections to backend storage system. Method restored for backward compatibility
*/
public void close();
public RemoteResource getUrl(boolean forceCreation);

View File

@ -929,6 +929,26 @@ public class ServiceEngine implements IClient {
}
}
@Override
public void close(){
currentOperation="close";
file.setOwner(owner);
getMyFile().setRemoteResource(REMOTE_RESOURCE.PATH);
setMyFile(file);
service.setResource(getMyFile());
service.setTypeOperation("forceclose");
try {
if(((file.getInputStream() != null) || (file.getOutputStream()!=null)) || ((file.getLocalPath() != null) || (file.getRemotePath() != null)))
service.startOperation(file,file.getRemotePath(), owner, primaryBackend, Costants.DEFAULT_CHUNK_OPTION, getContext(), isReplaceOption());
else{
logger.error("parameters incompatible ");
}
} catch (Throwable t) {
logger.error("get()", t.getCause());
throw new RemoteBackendException(" Error in "+currentOperation+" operation ", t.getCause());
}
}
public String getServiceClass() {