ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [07/32] ignite git commit: IGNITE-466: IGFS: Added "IgfsMode mode(IgfsPath)" method.
Date Mon, 22 Aug 2016 07:37:03 GMT
IGNITE-466: IGFS: Added "IgfsMode mode(IgfsPath)" method.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9ddf9d84
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9ddf9d84
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9ddf9d84

Branch: refs/heads/ignite-3220-1
Commit: 9ddf9d846f52a4e8fc433643409993884c70ce37
Parents: f87ca48
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Thu Jul 21 16:00:45 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Aug 15 12:30:15 2016 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/IgniteFileSystem.java   | 9 +++++++++
 .../ignite/internal/processors/igfs/IgfsAsyncImpl.java      | 6 ++++++
 .../apache/ignite/internal/processors/igfs/IgfsImpl.java    | 7 +++++++
 .../apache/ignite/internal/processors/igfs/IgfsMock.java    | 8 ++++++++
 4 files changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9ddf9d84/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java b/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java
index def2965..bbc5bea 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteFileSystem.java
@@ -24,6 +24,7 @@ import org.apache.ignite.igfs.IgfsBlockLocation;
 import org.apache.ignite.igfs.IgfsFile;
 import org.apache.ignite.igfs.IgfsInputStream;
 import org.apache.ignite.igfs.IgfsMetrics;
+import org.apache.ignite.igfs.IgfsMode;
 import org.apache.ignite.igfs.IgfsOutputStream;
 import org.apache.ignite.igfs.IgfsPath;
 import org.apache.ignite.igfs.IgfsPathSummary;
@@ -456,6 +457,14 @@ public interface IgniteFileSystem extends IgniteAsyncSupport {
     @Nullable public IgfsFile info(IgfsPath path) throws IgniteException;
 
     /**
+     * Get mode for the given path.
+     *
+     * @param path Path.
+     * @return Mode used for this path.
+     */
+    public IgfsMode mode(IgfsPath path);
+
+    /**
      * Gets used space in bytes.
      *
      * @return Used space in bytes.

http://git-wip-us.apache.org/repos/asf/ignite/blob/9ddf9d84/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
index 7530557..bf3d22b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsAsyncImpl.java
@@ -26,6 +26,7 @@ import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.igfs.IgfsBlockLocation;
 import org.apache.ignite.igfs.IgfsFile;
 import org.apache.ignite.igfs.IgfsMetrics;
+import org.apache.ignite.igfs.IgfsMode;
 import org.apache.ignite.igfs.IgfsOutputStream;
 import org.apache.ignite.igfs.IgfsPath;
 import org.apache.ignite.igfs.IgfsPathSummary;
@@ -308,6 +309,11 @@ public class IgfsAsyncImpl extends AsyncSupportAdapter<IgniteFileSystem>
impleme
     }
 
     /** {@inheritDoc} */
+    @Override public IgfsMode mode(IgfsPath path) {
+        return igfs.mode(path);
+    }
+
+    /** {@inheritDoc} */
     @Override public long usedSpaceSize() {
         return igfs.usedSpaceSize();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9ddf9d84/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
index df7dfb5..0d1ffc1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsImpl.java
@@ -577,6 +577,13 @@ public final class IgfsImpl implements IgfsEx {
     }
 
     /** {@inheritDoc} */
+    @Override public IgfsMode mode(IgfsPath path) {
+        A.notNull(path, "path");
+
+        return modeRslvr.resolveMode(path);
+    }
+
+    /** {@inheritDoc} */
     @Override public IgfsPathSummary summary(final IgfsPath path) {
         A.notNull(path, "path");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/9ddf9d84/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
index dccab4a..a2bd9ca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMock.java
@@ -24,6 +24,7 @@ import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.igfs.IgfsBlockLocation;
 import org.apache.ignite.igfs.IgfsFile;
 import org.apache.ignite.igfs.IgfsMetrics;
+import org.apache.ignite.igfs.IgfsMode;
 import org.apache.ignite.igfs.IgfsOutputStream;
 import org.apache.ignite.igfs.IgfsPath;
 import org.apache.ignite.igfs.IgfsPathSummary;
@@ -361,6 +362,13 @@ public class IgfsMock implements IgfsEx {
     }
 
     /** {@inheritDoc} */
+    @Override public IgfsMode mode(IgfsPath path) {
+        throwUnsupported();
+
+        return null;
+    }
+
+    /** {@inheritDoc} */
     @Override public long usedSpaceSize() throws IgniteException {
         throwUnsupported();
 


Mime
View raw message