Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.ItemId


    /**
     * {@inheritDoc}
     */
    public void cache(ItemState state) {
        ItemId id = state.getId();
        if (cache.containsKey(id)) {
            log.warn("overwriting cached entry " + id);
        }
        cache.put(id, state);
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public void cache(ItemState state) {
        ItemId id = state.getId();
        if (refs.contains(id)) {
            log.warn("overwriting cached entry " + id);
        }
        // fake call to update stats of secondary cache
        cache.cache(state);
View Full Code Here

     * @throws ItemStateException
     */
    NodeState createNodeState(NodeState overlayedState, int initialStatus)
            throws ItemStateException {

        ItemId id = overlayedState.getId();

        // check map; synchronized to ensure an entry is not created twice.
        synchronized (transientStore) {
            if (transientStore.contains(id)) {
                String msg = "there's already a node state instance with id " + id;
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void put(ItemState state) {
        ItemId id = state.getId();
        if (map.containsKey(id)) {
            log.warn("overwriting map entry " + id);
        }
        map.put(id, state);
    }
View Full Code Here

    public void dump(PrintStream ps) {
        ps.println("map entries:");
        ps.println();
        Iterator iter = keySet().iterator();
        while (iter.hasNext()) {
            ItemId id = (ItemId) iter.next();
            ItemState state = get(id);
            dumpItemState(id, state, ps);
        }
    }
View Full Code Here

        try {
            int n = in.readInt();   // number of entries
            while (n-- > 0) {
                byte type = in.readByte()// entry type
                ItemId id;
                if (type == NODE_ENTRY) {
                    // entry type: node
                    String s = in.readUTF();    // id
                    id = NodeId.valueOf(s);
                } else {
View Full Code Here

            out.writeInt(stateStore.size());    // number of entries
            // entries
            Iterator iterKeys = stateStore.keySet().iterator();
            while (iterKeys.hasNext()) {
                ItemId id = (ItemId) iterKeys.next();
                if (id.denotesNode()) {
                    out.writeByte(NODE_ENTRY)// entry type
                } else {
                    out.writeByte(PROP_ENTRY)// entry type
                }
                out.writeUTF(id.toString());    // id
                byte[] data = (byte[]) stateStore.get(id);
                out.writeInt(data.length)// data length
                out.write(data);    // data
            }
        } finally {
            out.close();
        }

        // write references
        fsRes = new FileSystemResource(wspFS, REFS_FILE_PATH);
        fsRes.makeParentDirs();
        bos = new BufferedOutputStream(fsRes.getOutputStream());
        out = new DataOutputStream(bos);

        try {
            out.writeInt(refsStore.size()); // number of entries
            // entries
            Iterator iterKeys = refsStore.keySet().iterator();
            while (iterKeys.hasNext()) {
                NodeReferencesId id = (NodeReferencesId) iterKeys.next();
                out.writeUTF(id.toString());    // target id
                byte[] data = (byte[]) refsStore.get(id);
                out.writeInt(data.length)// data length
                out.write(data);    // data
            }
        } finally {
View Full Code Here

                    // we have enough access rights to see the event
                    continue;
                }

                // check read permission
                ItemId targetId;
                if (state.getChildUUID() == null) {
                    // target is a property
                    targetId = new PropertyId(state.getParentUUID(), state.getChildRelPath().getName());
                } else {
                    // target is a node
View Full Code Here

        for (Iterator it = events.iterator(); it.hasNext() && session.isLive();) {
            EventState state = (EventState) it.next();
            if (state.getType() == Event.NODE_ADDED
                    || state.getType() == Event.PROPERTY_ADDED
                    || state.getType() == Event.PROPERTY_CHANGED) {
                ItemId targetId;
                if (state.getChildUUID() == null) {
                    // target is a property
                    targetId = new PropertyId(state.getParentUUID(), state.getChildRelPath().getName());
                } else {
                    // target is a node
View Full Code Here

        try {
            int n = in.readInt();   // number of entries
            while (n-- > 0) {
                byte type = in.readByte()// entry type
                ItemId id;
                if (type == NODE_ENTRY) {
                    // entry type: node
                    String s = in.readUTF();    // id
                    id = NodeId.valueOf(s);
                } else {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.ItemId

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.