Package org.apache.jackrabbit.core.persistence.util

Examples of org.apache.jackrabbit.core.persistence.util.NodePropBundle.markOld()


        log.debug("Loading bundle {}", id);
        NodePropBundle bundle = loadBundle(id);
        cacheMissDuration.addAndGet(System.nanoTime() - time);
        cacheMissCounter.incrementAndGet();
        if (bundle != null) {
            bundle.markOld();
            bundles.put(id, bundle, bundle.getSize());
        } else {
            bundles.put(id, MISSING, 16);
        }
        return bundle;
View Full Code Here


                    + " inconsistent bundle(s)...");
            for (NodePropBundle bundle : modifications) {
                try {
                    info(bundle.getId().toString(), pm + ": Fixing bundle '"
                            + bundle.getId() + "'");
                    bundle.markOld(); // use UPDATE instead of INSERT
                    pm.storeBundle(bundle);
                    pm.evictBundle(bundle.getId());
                } catch (ItemStateException e) {
                    error(bundle.getId().toString(), pm
                            + ": Error storing fixed bundle: " + e);
View Full Code Here

                    error(lostNFoundId, "specified 'lost+found' node does not exist");
                } else if (!NameConstants.NT_UNSTRUCTURED.equals(lfBundle
                        .getNodeTypeName())) {
                    error(lostNFoundId, "specified 'lost+found' node is not of type nt:unstructered");
                } else {
                    lfBundle.markOld();
                    for (NodeId orphan : orphaned) {
                        String nodeName = orphan + "-"
                                + System.currentTimeMillis();
                        lfBundle.addChildNodeEntry(NF.create("", nodeName),
                                orphan);
View Full Code Here

        log.debug("Loading bundle {}", id);
        NodePropBundle bundle = loadBundle(id);
        cacheMissDuration.addAndGet(System.nanoTime() - time);
        cacheMissCounter.incrementAndGet();
        if (bundle != null) {
            bundle.markOld();
            bundles.put(id, bundle, bundle.getSize());
        } else {
            bundles.put(id, MISSING, MISSING_SIZE_ESTIMATE);
        }
        return bundle;
View Full Code Here

        log.debug("Loading bundle {}", id);
        NodePropBundle bundle = loadBundle(id);
        cacheMissDuration.addAndGet(System.nanoTime() - time);
        cacheMissCounter.incrementAndGet();
        if (bundle != null) {
            bundle.markOld();
            bundles.put(id, bundle, bundle.getSize());
        } else {
            bundles.put(id, MISSING, 16);
        }
        return bundle;
View Full Code Here

        if (fix && !modifications.isEmpty()) {
            log.info(pm + ": Fixing " + modifications.size() + " inconsistent bundle(s)...");
            for (NodePropBundle bundle : modifications) {
                try {
                    log.info(pm + ": Fixing bundle '" + bundle.getId() + "'");
                    bundle.markOld(); // use UPDATE instead of INSERT
                    pm.storeBundle(bundle);
                    pm.evictBundle(bundle.getId());
                } catch (ItemStateException e) {
                    log.error(pm + ": Error storing fixed bundle: " + e);
                }
View Full Code Here

                if (lfBundle == null) {
                    log.error("specified 'lost+found' node does not exist");
                } else if (!NameConstants.NT_UNSTRUCTURED.equals(lfBundle.getNodeTypeName())) {
                    log.error("specified 'lost+found' node is not of type nt:unstructered");
                } else {
                    lfBundle.markOld();
                    for (NodeId orphan : orphaned) {
                        String nodeName = orphan + "-" + System.currentTimeMillis();
                        lfBundle.addChildNodeEntry(NF.create("", nodeName), orphan);
                    }
                    pm.storeBundle(lfBundle);
View Full Code Here

        if (fix && !modifications.isEmpty()) {
            log.info(name + ": Fixing " + modifications.size() + " inconsistent bundle(s)...");
            for (NodePropBundle bundle : modifications) {
                try {
                    log.info(name + ": Fixing bundle '" + bundle.getId() + "'");
                    bundle.markOld(); // use UPDATE instead of INSERT
                    storeBundle(bundle);
                    evictBundle(bundle.getId());
                } catch (ItemStateException e) {
                    log.error(name + ": Error storing fixed bundle: " + e);
                }
View Full Code Here

        if (fix && !modifications.isEmpty()) {
            log.info(name + ": Fixing " + modifications.size() + " inconsistent bundle(s)...");
            for (NodePropBundle bundle : modifications) {
                try {
                    log.info(name + ": Fixing bundle '" + bundle.getId() + "'");
                    bundle.markOld(); // use UPDATE instead of INSERT
                    storeBundle(bundle);
                    evictBundle(bundle.getId());
                } catch (ItemStateException e) {
                    log.error(name + ": Error storing fixed bundle: " + e);
                }
View Full Code Here

                                log.error(message);
                                addMessage(reports, id, message, ReportItem.Type.ORPHANED);
                                if (fix && lostNFoundId != null) {
                                    // add a child to lost+found
                                    NodePropBundle lfBundle = pm.loadBundle(lostNFoundId);
                                    lfBundle.markOld();
                                    String nodeName = id + "-" + System.currentTimeMillis();
                                    lfBundle.addChildNodeEntry(NF.create("", nodeName), id);
                                    pm.storeBundle(lfBundle);
                                    pm.evictBundle(lostNFoundId);
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.