Package org.apache.jackrabbit.oak.spi.state

Examples of org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder


        if (type == null || PERSISTENCE_OAK.equalsIgnoreCase(type)) {
            NodeState index = getIndexDataNode(def);
            if (index == null) {
                return null;
            }
            return new OakDirectory(new ReadOnlyBuilder(index));
        }

        if (PERSISTENCE_FILE.equalsIgnoreCase(type)) {
            String fs = def.getString(PERSISTENCE_PATH);
            if (fs == null) {
View Full Code Here


    public ImmutableTree(@Nonnull ImmutableTree parent, @Nonnull String name, @Nonnull NodeState state) {
        this(new DefaultParentProvider(parent), name, state);
    }

    public ImmutableTree(@Nonnull ParentProvider parentProvider, @Nonnull String name, @Nonnull NodeState state) {
        super(name, new ReadOnlyBuilder(state));
        this.state = state;
        this.parentProvider = parentProvider;
    }
View Full Code Here

            LOG.debug("query() - indexStorageNodeName: {}", indexStorageNodeName);           
            LOG.debug("query() - pr: {}", pr);           
        }
       
        final NodeState indexState = indexMeta.getChildNode(indexStorageNodeName);
        final NodeBuilder index = new ReadOnlyBuilder(indexState);
        final String firstEncoded = (pr.first == null) ? null
                                                       : encode(pr.first.getValue(Type.STRING));
        final String lastEncoded = (pr.last == null) ? null
                                                     : encode(pr.last.getValue(Type.STRING));
       
View Full Code Here

     *
     * @param nodeState the node state to inspect
     * @return the next value
     */
    static String getPropertyNext(@Nonnull final NodeState state, final int lane) {
        return getPropertyNext(new ReadOnlyBuilder(state), lane);
    }
View Full Code Here

    }

    @Override
    public Cursor query(Filter filter, String revisionId, NodeState root) {

        NodeBuilder builder = new ReadOnlyBuilder(root);
        for (String name : indexDataPath) {
            builder = builder.getChildBuilder(name);
        }
        Directory directory = new ReadOnlyOakDirectory(builder);
        long s = System.currentTimeMillis();

        try {
View Full Code Here

        if (type == null || PERSISTENCE_OAK.equalsIgnoreCase(type)) {
            NodeState index = getIndexDataNode(def);
            if (index == null) {
                return null;
            }
            return new OakDirectory(new ReadOnlyBuilder(index));
        }

        if (PERSISTENCE_FILE.equalsIgnoreCase(type)) {
            String fs = getString(def, PERSISTENCE_PATH);
            if (fs == null) {
View Full Code Here

        this(parentProvider, name, state, TreeTypeProvider.EMPTY);
    }

    public ImmutableTree(@Nonnull ParentProvider parentProvider, @Nonnull String name,
                         @Nonnull NodeState state, @Nonnull TreeTypeProvider typeProvider) {
        super(name, new ReadOnlyBuilder(state));
        this.state = state;
        this.parentProvider = parentProvider;
        this.typeProvider = typeProvider;
    }
View Full Code Here

            throws IOException {
        Directory directory = null;

        NodeState data = definition.getChildNode(INDEX_DATA_CHILD_NAME);
        if (data.exists()) {
            directory = new OakDirectory(new ReadOnlyBuilder(data));
        } else if (PERSISTENCE_FILE.equalsIgnoreCase(definition.getString(PERSISTENCE_NAME))) {
            String path = definition.getString(PERSISTENCE_PATH);
            if (path != null && new File(path).exists()) {
                directory = FSDirectory.open(new File(path));
            }
View Full Code Here

            LOG.debug("query() - indexStorageNodeName: {}", indexStorageNodeName);           
            LOG.debug("query() - pr: {}", pr);           
        }
       
        final NodeState indexState = indexMeta.getChildNode(indexStorageNodeName);
        final NodeBuilder index = new ReadOnlyBuilder(indexState);
        final String firstEncoded = (pr.first == null) ? null
                                                       : encode(pr.first.getValue(Type.STRING));
        final String lastEncoded = (pr.last == null) ? null
                                                     : encode(pr.last.getValue(Type.STRING));
       
View Full Code Here

     *
     * @param nodeState the node state to inspect
     * @return the next value
     */
    static String getPropertyNext(@Nonnull final NodeState state, final int lane) {
        return getPropertyNext(new ReadOnlyBuilder(state), lane);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder

Copyright © 2018 www.massapicom. 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.