Compare commits

...

6 Commits

Author SHA1 Message Date
Roberto Cirillo 2e4e709ff8 restore source to 1.8 2022-09-19 10:30:29 +02:00
Roberto Cirillo 89524aac9c set source jdk to 11 2022-09-19 10:28:15 +02:00
Roberto Cirillo c252d1c5ae removing jvm source tag 2022-09-19 10:26:36 +02:00
Roberto Cirillo ae6740cfbb set java version 2022-09-19 10:22:43 +02:00
Roberto Cirillo ac95563480 update to version 2.9.2 2022-09-07 17:25:49 +02:00
Roberto Cirillo 904bf0bc17 restored close method 2022-09-07 17:10:08 +02:00
4 changed files with 43 additions and 8 deletions

View File

@ -1,5 +1,13 @@
# Changelog for storage-manager-core
## [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

18
pom.xml
View File

@ -8,9 +8,11 @@
</parent>
<groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-core</artifactId>
<version>2.9.1</version>
<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>
@ -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() {