Examples of listing()


Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

                id2InfoPrj.put(TRASH_ID, new GridGgfsFileInfo(TRASH_ID));

            Map<String, GridGgfsListingEntry> rootListing = rootInfo.listing();

            if (!rootListing.isEmpty()) {
                GridUuid[] lockIds = new GridUuid[rootInfo.listing().size()];

                int i = 0;

                for (GridGgfsListingEntry entry : rootInfo.listing().values())
                    lockIds[i++] = entry.fileId();
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

            if (!rootListing.isEmpty()) {
                GridUuid[] lockIds = new GridUuid[rootInfo.listing().size()];

                int i = 0;

                for (GridGgfsListingEntry entry : rootInfo.listing().values())
                    lockIds[i++] = entry.fileId();

                // Lock children IDs in correct order.
                lockIds(lockIds);
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

                    GridGgfsFileInfo parentInfo = locks.get(parentId);

                    // Ensure parent is still in place.
                    if (parentInfo != null) {
                        Map<String, GridGgfsListingEntry> newListing =
                            new HashMap<>(parentInfo.listing().size(), 1.0f);

                        newListing.putAll(parentInfo.listing());

                        // Remove child entries if possible.
                        for (Map.Entry<String, GridGgfsListingEntry> entry : listing.entrySet()) {
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

                    // Ensure parent is still in place.
                    if (parentInfo != null) {
                        Map<String, GridGgfsListingEntry> newListing =
                            new HashMap<>(parentInfo.listing().size(), 1.0f);

                        newListing.putAll(parentInfo.listing());

                        // Remove child entries if possible.
                        for (Map.Entry<String, GridGgfsListingEntry> entry : listing.entrySet()) {
                            GridUuid entryId = entry.getValue().fileId();
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

                            GridGgfsFileInfo entryInfo = locks.get(entryId);

                            if (entryInfo != null) {
                                // Delete only files or empty folders.
                                if (entryInfo.isFile() || entryInfo.isDirectory() && entryInfo.listing().isEmpty()) {
                                    id2InfoPrj.remove(entryId);

                                    newListing.remove(entry.getKey());

                                    res.add(entryId);
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

                    if (infos.containsKey(parentId) && infos.containsKey(id)) {
                        GridGgfsFileInfo parentInfo = infos.get(parentId);

                        assert parentInfo != null;

                        GridGgfsListingEntry listingEntry = parentInfo.listing().get(name);

                        if (listingEntry != null)
                            id2InfoPrj.transform(parentId, new UpdateListing(name, listingEntry, true));

                        id2InfoPrj.remove(id);
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

        if (busyLock.enterBusy()) {
            try {
                GridGgfsFileInfo trashInfo = id2InfoPrj.get(TRASH_ID);

                if (trashInfo != null) {
                    Map<String, GridGgfsListingEntry> listing = trashInfo.listing();

                    if (listing != null && !listing.isEmpty()) {
                        return F.viewReadOnly(listing.values(), new GridClosure<GridGgfsListingEntry, GridUuid>() {
                            @Override public GridUuid apply(GridGgfsListingEntry e) {
                                return e.fileId();
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

            if (oldInfo == null)
                return null; // File not found.

            if (parentInfo != null) {
                Map<String, GridGgfsListingEntry> listing = parentInfo.listing();

                GridGgfsListingEntry entry = listing.get(fileName);

                if (entry == null || !entry.fileId().equals(fileId)) // File was removed or recreated.
                    return null;
View Full Code Here

Examples of org.gridgain.grid.kernal.processors.ggfs.GridGgfsFileInfo.listing()

                    if (parentInfo == null)
                        throw new GridGgfsInvalidPathException("Failed to update times (parent was not found): " +
                            fileName);

                    GridGgfsListingEntry entry = parentInfo.listing().get(fileName);

                    // Validate listing.
                    if (entry == null || !entry.fileId().equals(fileId))
                        throw new GridGgfsInvalidPathException("Failed to update times (file concurrently modified): " +
                            fileName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.