Skip to content

Commit

Permalink
Merge branch 'release/0.3.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
overheadhunter committed Nov 5, 2022
2 parents 16c7b9b + bd9e361 commit a6b6e19
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 27 deletions.
2 changes: 1 addition & 1 deletion jfuse-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse-parent</artifactId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse-api</artifactId>
Expand Down
1 change: 1 addition & 0 deletions jfuse-api/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
requires static org.jetbrains.annotations;

exports org.cryptomator.jfuse.api;
exports org.cryptomator.jfuse.api.platforms to org.cryptomator.jfuse.linux.aarch64, org.cryptomator.jfuse.linux.amd64, org.cryptomator.jfuse.mac, org.cryptomator.jfuse.win;

uses FuseBuilder;
}
9 changes: 7 additions & 2 deletions jfuse-api/src/main/java/org/cryptomator/jfuse/api/Fuse.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,24 @@ private int fuseLoop(FuseMount mount) {
/**
* Unmounts (if needed) this fuse file system and frees up system resources.
* <p>
* This method is idempotent and closing multiple times will be no-op.
* <p>
* <strong>Important:</strong> Before closing, a graceful unmount via system tools (e.g. {@code fusermount -u}) should be attempted.
*/
@Override
@Blocking
@MustBeInvokedByOverriders
public void close() throws TimeoutException {
public synchronized void close() throws TimeoutException {
if (!fuseScope.isAlive()) {
return; // already closed
}
try {
var fuseMount = this.mount.getAndSet(UNMOUNTED);
fuseMount.unmount();
executor.shutdown();
boolean exited = executor.awaitTermination(10, TimeUnit.SECONDS);
if (!exited) {
throw new TimeoutException("fuse main loop continued runn");
throw new TimeoutException("fuse main loop continued run");
}
fuseMount.destroy();
} catch (InterruptedException e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.cryptomator.jfuse.api;

import org.cryptomator.jfuse.api.platforms.Architecture;
import org.cryptomator.jfuse.api.platforms.OperatingSystem;
import org.cryptomator.jfuse.api.platforms.SupportedPlatform;
import org.jetbrains.annotations.Nullable;

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cryptomator.jfuse.api;
package org.cryptomator.jfuse.api.platforms;

/**
* CPU architecture
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cryptomator.jfuse.api;
package org.cryptomator.jfuse.api.platforms;

/**
* Operating System
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
package org.cryptomator.jfuse.api;
package org.cryptomator.jfuse.api.platforms;

import org.cryptomator.jfuse.api.FuseBuilder;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.cryptomator.jfuse.api;
package org.cryptomator.jfuse.api.platforms;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
Expand Down
2 changes: 1 addition & 1 deletion jfuse-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse-parent</artifactId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse-examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jfuse-linux-aarch64/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>jfuse-parent</artifactId>
<groupId>org.cryptomator</groupId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse-linux-aarch64</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.cryptomator.jfuse.linux.aarch64;

import org.cryptomator.jfuse.api.Architecture;
import org.cryptomator.jfuse.api.Errno;
import org.cryptomator.jfuse.api.Fuse;
import org.cryptomator.jfuse.api.FuseBuilder;
import org.cryptomator.jfuse.api.FuseOperations;
import org.cryptomator.jfuse.api.OperatingSystem;
import org.cryptomator.jfuse.api.SupportedPlatform;
import org.cryptomator.jfuse.api.platforms.Architecture;
import org.cryptomator.jfuse.api.platforms.OperatingSystem;
import org.cryptomator.jfuse.api.platforms.SupportedPlatform;

/**
* Builds FUSE file system instances on Linux (aarch64).
Expand Down
2 changes: 1 addition & 1 deletion jfuse-linux-amd64/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse-parent</artifactId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse-linux-amd64</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.cryptomator.jfuse.linux.amd64;

import org.cryptomator.jfuse.api.Architecture;
import org.cryptomator.jfuse.api.Errno;
import org.cryptomator.jfuse.api.Fuse;
import org.cryptomator.jfuse.api.FuseBuilder;
import org.cryptomator.jfuse.api.FuseOperations;
import org.cryptomator.jfuse.api.OperatingSystem;
import org.cryptomator.jfuse.api.SupportedPlatform;
import org.cryptomator.jfuse.api.platforms.Architecture;
import org.cryptomator.jfuse.api.platforms.OperatingSystem;
import org.cryptomator.jfuse.api.platforms.SupportedPlatform;

/**
* Builds FUSE file system instances on Linux (x86_64).
Expand Down
2 changes: 1 addition & 1 deletion jfuse-mac/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse-parent</artifactId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse-mac</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.cryptomator.jfuse.mac;

import org.cryptomator.jfuse.api.Architecture;
import org.cryptomator.jfuse.api.Errno;
import org.cryptomator.jfuse.api.Fuse;
import org.cryptomator.jfuse.api.FuseBuilder;
import org.cryptomator.jfuse.api.FuseOperations;
import org.cryptomator.jfuse.api.OperatingSystem;
import org.cryptomator.jfuse.api.SupportedPlatform;
import org.cryptomator.jfuse.api.platforms.Architecture;
import org.cryptomator.jfuse.api.platforms.OperatingSystem;
import org.cryptomator.jfuse.api.platforms.SupportedPlatform;

import java.nio.file.Files;
import java.nio.file.Path;
Expand Down
2 changes: 1 addition & 1 deletion jfuse-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse-parent</artifactId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse-tests</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion jfuse-win/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse-parent</artifactId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse-win</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.cryptomator.jfuse.win;

import org.cryptomator.jfuse.api.Architecture;
import org.cryptomator.jfuse.api.Errno;
import org.cryptomator.jfuse.api.Fuse;
import org.cryptomator.jfuse.api.FuseBuilder;
import org.cryptomator.jfuse.api.FuseOperations;
import org.cryptomator.jfuse.api.OperatingSystem;
import org.cryptomator.jfuse.api.SupportedPlatform;
import org.cryptomator.jfuse.api.platforms.Architecture;
import org.cryptomator.jfuse.api.platforms.OperatingSystem;
import org.cryptomator.jfuse.api.platforms.SupportedPlatform;

/**
* Builds FUSE file system instances on Windows.
Expand Down
2 changes: 1 addition & 1 deletion jfuse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.cryptomator</groupId>
<artifactId>jfuse-parent</artifactId>
<version>0.3.2</version>
<version>0.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jfuse</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>org.cryptomator</groupId>
<artifactId>jfuse-parent</artifactId>
<packaging>pom</packaging>
<version>0.3.2</version>
<version>0.3.3</version>
<name>jFUSE</name>
<description>Java bindings for FUSE using foreign functions &amp; memory API</description>
<url>https://github.com/cryptomator/jfuse</url>
Expand Down

0 comments on commit a6b6e19

Please sign in to comment.