/** * Constructor * * @param dfltMode Default IGFS mode. * @param modes List of configured modes. The order is significant as modes are added in order of occurrence. * @throws IgniteCheckedException On error. */ public IgfsModeResolver(IgfsMode dfltMode, @Nullable ArrayList<T2<IgfsPath, IgfsMode>> modes) throws IgniteCheckedException { assert dfltMode != null; this.dfltMode = dfltMode; dualParentsWithPrimaryChildren = new HashSet<>(); this.modes = IgfsUtils.preparePathModes(dfltMode, modes, dualParentsWithPrimaryChildren); if (modes != null) modesCache = new GridBoundedConcurrentLinkedHashMap<>(MAX_PATH_CACHE); }
IgfsUtils.preparePathModes(DUAL_SYNC, Arrays.asList( new T2<>(new IgfsPath("/a/"), PRIMARY), new T2<>(new IgfsPath("/a/b/"), DUAL_ASYNC)), new HashSet<IgfsPath>()); if (m != IgfsMode.PRIMARY) { try { IgfsUtils.preparePathModes(PRIMARY, Arrays.asList(new T2<>(new IgfsPath("/a/"), DUAL_ASYNC)), new HashSet<IgfsPath>()); List<T2<IgfsPath, IgfsMode>> modes = IgfsUtils.preparePathModes(DUAL_SYNC, Arrays.asList( new T2<>(new IgfsPath("/a"), PRIMARY), new T2<>(new IgfsPath("/c/d/"), PRIMARY), modes = IgfsUtils.preparePathModes(DUAL_SYNC, Arrays.asList( new T2<>(new IgfsPath("/a/b"), DUAL_ASYNC), new T2<>(new IgfsPath("/a/b/c"), DUAL_SYNC),
Set<IgfsPath> set = new HashSet<>(); IgfsUtils.preparePathModes(DUAL_SYNC, Arrays.asList( new T2<>(new IgfsPath("/a/b"), DUAL_ASYNC), new T2<>(new IgfsPath("/a/b/c"), PRIMARY), IgfsUtils.preparePathModes(DUAL_ASYNC, Arrays.asList( new T2<>(new IgfsPath("/a/b/x/y/z"), PRIMARY), new T2<>(new IgfsPath("/a/b/c"), PRIMARY),
/** * Constructor * * @param dfltMode Default IGFS mode. * @param modes List of configured modes. The order is significant as modes are added in order of occurrence. * @throws IgniteCheckedException On error. */ public IgfsModeResolver(IgfsMode dfltMode, @Nullable ArrayList<T2<IgfsPath, IgfsMode>> modes) throws IgniteCheckedException { assert dfltMode != null; this.dfltMode = dfltMode; dualParentsWithPrimaryChildren = new HashSet<>(); this.modes = IgfsUtils.preparePathModes(dfltMode, modes, dualParentsWithPrimaryChildren); if (modes != null) modesCache = new GridBoundedConcurrentLinkedHashMap<>(MAX_PATH_CACHE); }