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


     * @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

            for (int i = 0; i < slots.length; i++) {
                Map locks = slots[i];
                synchronized (locks) {
                    Iterator it = locks.keySet().iterator();
                    while (it.hasNext()) {
                        ItemId id = (ItemId) it.next();
                        if (FineGrainedISMLocking.hasDependency(changes, id)) {
                            return true;
                        }
                    }
                }
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

        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

     * @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) {
        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

    public ItemState get(ItemId id) {
        return map.get(id);
    }

    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

                Value[] usersValues = usersProp.getValues();
                for (int i = 0; i < usersValues.length; i++) {
                    String userValue = usersValues[i].getString();
                    //Anyone
                    if (userValue.equals(AnonymousPrincipal.getUsername())) {
                      ItemId itemId  = ((ItemImpl) item).getId();
                        SecurityCaches.singleton().getPublicItemsCache().add(itemId);
                        return true;
                    }
                    if (status == JackrabbitAccessManager.REGISTERED && userValue.equals(username)) {
                        return true;
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.