Examples of MutableReferrerCounts


Examples of org.modeshape.jcr.cache.ReferrerCounts.MutableReferrerCounts

            }
            return keys;
        }

        public ReferrerCounts getReferrerCounts( ReferrerCounts persisted ) {
            MutableReferrerCounts mutable = persisted != null ? persisted.mutable() : ReferrerCounts.createMutable();
            for (Set<NodeKey> sourceKeys : addedStrong.values()) {
                for (NodeKey key : sourceKeys) {
                    mutable.addStrong(key, 1);
                }
            }
            for (Set<NodeKey> sourceKeys : addedWeak.values()) {
                for (NodeKey key : sourceKeys) {
                    mutable.addWeak(key, 1);
                }
            }
            for (Set<NodeKey> sourceKeys : removedStrong.values()) {
                for (NodeKey key : sourceKeys) {
                    mutable.addStrong(key, -1);
                }
            }
            for (Set<NodeKey> sourceKeys : removedWeak.values()) {
                for (NodeKey key : sourceKeys) {
                    mutable.addWeak(key, -1);
                }
            }
            return mutable.freeze();
        }
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.