Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.ItemId


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

        ItemId id = overlayedState.getNodeId();

        // 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


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

                // check read permission
                ItemId targetId = state.getTargetId();
                boolean granted = false;
                try {
                    granted = canRead(state);
                } catch (RepositoryException e) {
                    log.warn("Unable to check access rights for item: " + targetId);
View Full Code Here

            deletedIds.add(((ItemState) deletedItems.next()).getId());
        }

        for (Iterator it = events.iterator(); it.hasNext();) {
            EventState evState = (EventState) it.next();
            ItemId targetId = evState.getTargetId();
            if (deletedIds.contains(targetId)) {
                // check read permission
                boolean granted = false;
                try {
                    granted = canRead(evState);
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 = state.getTargetId();
                if (!canRead(state)) {
                    if (denied == null) {
                        denied = new HashSet();
                    }
                    denied.add(targetId);
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public synchronized 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
     */
    public NodeState createTransientNodeState(NodeState overlayedState, int initialStatus)
            throws ItemStateException {

        ItemId id = overlayedState.getNodeId();

        // 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

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

        ItemId id = overlayedState.getNodeId();

        // 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 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

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

    private void shrinkIfRequired() {
        // remove items, if too many
        synchronized (cache) {
            while (totalMem > maxMem) {
                ItemId id = (ItemId) cache.firstKey();
                Entry entry = (Entry) cache.remove(id);
                totalMem -= entry.size;
            }
        }
    }
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.