Package org.apache.jackrabbit.core.persistence

Examples of org.apache.jackrabbit.core.persistence.PersistenceManager


                                                      DelegatingObservationDispatcher delegatingDispatcher)
            throws RepositoryException {


        FileSystem fs = vConfig.getFileSystem();
        PersistenceManager pm = createPersistenceManager(vConfig.getHomeDir(),
                fs,
                vConfig.getPersistenceManagerConfig(),
                rootNodeId,
                nsReg,
                ntReg,
View Full Code Here


                                                               NamespaceRegistry nsReg,
                                                               NodeTypeRegistry ntReg,
                                                               DataStore dataStore)
            throws RepositoryException {
        try {
            PersistenceManager pm = pmConfig.newInstance(PersistenceManager.class);
            pm.init(new PMContext(homeDir, fs, rootNodeId, nsReg, ntReg, dataStore));
            return pm;
        } catch (Exception e) {
            String msg = "Cannot instantiate persistence manager " + pmConfig.getClassName();
            throw new RepositoryException(msg, e);
        }
View Full Code Here

     * @throws RepositoryException
     */
    public GarbageCollector createDataStoreGarbageCollector() throws RepositoryException {
        ArrayList<PersistenceManager> pmList = new ArrayList<PersistenceManager>();
        InternalVersionManagerImpl vm = (InternalVersionManagerImpl) rep.getVersionManager();
        PersistenceManager pm = vm.getPersistenceManager();
        pmList.add(pm);
        String[] wspNames = rep.getWorkspaceNames();
        Session[] sessions = new Session[wspNames.length];
        for (int i = 0; i < wspNames.length; i++) {
            String wspName = wspNames[i];
View Full Code Here

                Method m = r.getClass().getDeclaredMethod("getWorkspaceInfo", new Class[] { String.class });
                m.setAccessible(true);
                Object info = m.invoke(r, names[i]);
                m = info.getClass().getDeclaredMethod("getPersistenceManager", new Class[0]);
                m.setAccessible(true);
                PersistenceManager pm = (PersistenceManager) m.invoke(info, new Object[0]);
                if (!(pm instanceof AbstractBundlePersistenceManager)) {
                    log("PM skipped: " + pm.getClass());
                    continue;
                }
                AbstractBundlePersistenceManager apm = (AbstractBundlePersistenceManager) pm;
                log("PM: " + pm.getClass().getName());

                log("All nodes in one step");
                NodeId after = null;
                NodeId first = null;
                for (NodeId id : apm.getAllNodeIds(null, 0)) {
View Full Code Here

                                                      DelegatingObservationDispatcher delegatingDispatcher)
            throws RepositoryException {


        FileSystem fs = vConfig.getFileSystem();
        PersistenceManager pm = createPersistenceManager(
                vConfig.getHomeDir(), fs,
                vConfig.getPersistenceManagerConfig());

        ISMLocking ismLocking = vConfig.getISMLocking();
View Full Code Here

     */
    private PersistenceManager createPersistenceManager(
            File homeDir, FileSystem fs, PersistenceManagerConfig pmConfig)
            throws RepositoryException {
        try {
            PersistenceManager pm = pmConfig
                    .newInstance(PersistenceManager.class);
            PMContext pmContext = new PMContext(
                    homeDir, fs,
                    context.getRootNodeId(),
                    context.getNamespaceRegistry(),
                    context.getNodeTypeRegistry(),
                    context.getDataStore(),
                    context.getRepositoryStatistics());
            pm.init(pmContext);
            return pm;
        } catch (Exception e) {
            String msg = "Cannot instantiate persistence manager " + pmConfig.getClassName();
            throw new RepositoryException(msg, e);
        }
View Full Code Here

     */
    public GarbageCollector createDataStoreGarbageCollector()
            throws RepositoryException {
        ArrayList<PersistenceManager> pmList = new ArrayList<PersistenceManager>();
        InternalVersionManagerImpl vm = context.getInternalVersionManager();
        PersistenceManager pm = vm.getPersistenceManager();
        pmList.add(pm);
        String[] wspNames = getWorkspaceNames();
        SessionImpl[] sessions = new SessionImpl[wspNames.length];
        for (int i = 0; i < wspNames.length; i++) {
            String wspName = wspNames[i];
View Full Code Here

            //will never happen
            log.error("Malformed path", e);
        }

        this.stateMgr = handler.getContext().getItemStateManager();
        final PersistenceManager pm = handler.getContext().getPersistenceManager();
        if (pm instanceof IterablePersistenceManager) {
            this.pm = (IterablePersistenceManager) pm;
        }
    }
View Full Code Here

            //will never happen
            log.error("Malformed path", e);
        }

        this.stateMgr = handler.getContext().getItemStateManager();
        final PersistenceManager pm = handler.getContext().getPersistenceManager();
        if (pm instanceof IterablePersistenceManager) {
            this.pm = (IterablePersistenceManager) pm;
        }
    }
View Full Code Here

                                                      DelegatingObservationDispatcher delegatingDispatcher)
            throws RepositoryException {


        FileSystem fs = vConfig.getFileSystem();
        PersistenceManager pm = createPersistenceManager(
                vConfig.getHomeDir(), fs,
                vConfig.getPersistenceManagerConfig());

        ISMLocking ismLocking = vConfig.getISMLocking();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.persistence.PersistenceManager

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.