Examples of TreeLocation


Examples of com.sleepycat.je.tree.TreeLocation

        DbTree dbMapTree = env.getDbMapTree();

        LNInfo[] pendingLNs = fileSelector.getPendingLNs();
        if (pendingLNs != null) {
            TreeLocation location = new TreeLocation();

            for (int i = 0; i < pendingLNs.length; i += 1) {
                LNInfo info = pendingLNs[i];

                DatabaseId dbId = info.getDbId();
View Full Code Here

Examples of com.sleepycat.je.tree.TreeLocation

        long undoLsn = lastLoggedLsn;
        LogManager logManager = envImpl.getLogManager();

        try {
            Set alreadyUndone = new HashSet();
            TreeLocation location = new TreeLocation();
            while (undoLsn != DbLsn.NULL_LSN) {

                LNLogEntry undoEntry =
        (LNLogEntry) logManager.getLogEntry(undoLsn);
                LN undoLN = undoEntry.getLN();
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.TreeLocation

        } else {
            return dlg.perform(new SessionOperation<PropertyImpl>() {
                @Override
                public PropertyImpl perform() throws RepositoryException {
                    String oakPath = dlg.getOakPathOrThrowNotFound(absPath);
                    TreeLocation loc = dlg.getLocation(oakPath);
                    if (loc.getProperty() == null) {
                        throw new PathNotFoundException(absPath);
                    }
                    else {
                        return new PropertyImpl(new PropertyDelegate(dlg, loc));
                    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.TreeLocation

        } else {
            return dlg.perform(new SessionOperation<Boolean>() {
                @Override
                public Boolean perform() throws RepositoryException {
                    String oakPath = dlg.getOakPathOrThrowNotFound(absPath);
                    TreeLocation loc = dlg.getLocation(oakPath);
                    return loc.getProperty() != null;
                }
            });
        }
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.TreeLocation

     * @return  tree location of the underlying item
     * @throws InvalidItemStateException if the location points to a stale item
     */
    @Nonnull
    public TreeLocation getLocation() throws InvalidItemStateException {
        TreeLocation location = getLocationOrNull();
        if (location == null) {
            throw new InvalidItemStateException("Item is stale");
        }
        return location;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.TreeLocation

        return getLocation().getProperty()// Not null
    }

    @Override
    public PropertyLocation getLocation() throws InvalidItemStateException {
        TreeLocation location = super.getLocation();
        if (location.getProperty() == null) {
            throw new InvalidItemStateException("Property is stale");
        }
        return (PropertyLocation) location;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.TreeLocation

     * @param path Oak path
     * @return  The {@code PropertyDelegate} at {@code path} or {@code null} if
     * none exists or not accessible.
     */
    public PropertyDelegate getProperty(String path) {
        TreeLocation location = root.getLocation(path);
        return location.getProperty() == null
            ? null
            : new PropertyDelegate(this, location);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.TreeLocation

     * @return  property at the path given by {@code relPath} or {@code null} if
     * no such property exists
     */
    @CheckForNull
    public PropertyDelegate getProperty(String relPath) throws InvalidItemStateException {
        TreeLocation propertyLocation = getChildLocation(relPath);
        PropertyState propertyState = propertyLocation.getProperty();
        return propertyState == null
                ? null
                : new PropertyDelegate(sessionDelegate, propertyLocation);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.TreeLocation

     * @return  node at the path given by {@code relPath} or {@code null} if
     * no such node exists
     */
    @CheckForNull
    public NodeDelegate getChild(String relPath) throws InvalidItemStateException {
        TreeLocation childLocation = getChildLocation(relPath);
        return create(sessionDelegate, childLocation);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.api.TreeLocation

                });
    }

    private Iterator<PropertyDelegate> propertyDelegateIterator(
            Iterator<? extends PropertyState> properties) throws InvalidItemStateException {
        final TreeLocation location = getLocation();
        return Iterators.transform(
                Iterators.filter(properties, new Predicate<PropertyState>() {
                    @Override
                    public boolean apply(PropertyState property) {
                        return !property.getName().startsWith(":");
                    }
                }),
                new Function<PropertyState, PropertyDelegate>() {
                    @Override
                    public PropertyDelegate apply(PropertyState propertyState) {
                        return new PropertyDelegate(sessionDelegate, location.getChild(propertyState.getName()));
                    }
                });
    }
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.