Examples of BinaryStorage


Examples of org.modeshape.jcr.RepositoryConfiguration.BinaryStorage

                    suspendExistingUserTransaction();

                    if (change.largeValueChanged) {
                        // We can update the value used in the repository cache dynamically ...
                        BinaryStorage binaryStorage = config.getBinaryStorage();
                        this.cache.setLargeStringLength(binaryStorage.getMinimumBinarySizeInBytes());
                        this.context.getBinaryStore().setMinimumBinarySizeInBytes(binaryStorage.getMinimumBinarySizeInBytes());
                    }
                    if (change.predefinedWorkspacesChanged) {
                        // Make sure that all the predefined workspaces are available ...
                        for (String workspaceName : config.getPredefinedWorkspaceNames()) {
                            this.cache.createWorkspace(workspaceName);
                        }
                    }
                    this.mimeTypeDetector = new MimeTypeDetectors(other.config.environment(), this.problems);
                    this.binaryStore = other.binaryStore;
                    this.changeBus = other.changeBus;
                    this.internalWorkerContext = other.internalWorkerContext;
                    this.nodeTypes = other.nodeTypes.with(this, true, true);
                    this.lockManager = other.lockManager.with(this);
                    // We have to register new components that depend on this instance ...
                    this.changeBus.unregister(other.nodeTypes);
                    this.changeBus.unregister(other.lockManager);
                    this.changeBus.register(this.nodeTypes);
                    this.changeBus.register(this.lockManager);
                    this.persistentRegistry = other.persistentRegistry;
                    this.changeDispatchingQueue = other.changeDispatchingQueue;
                    this.clusteringService = other.clusteringService;
                    this.journal = other.journal;
                } else {
                    // find the Schematic database and Infinispan Cache ...
                    CacheContainer container = config.getContentCacheContainer();
                    String cacheName = config.getCacheName();
                    List<Component> connectorComponents = config.getFederation().getConnectors(this.problems);
                    Map<String, List<RepositoryConfiguration.ProjectionConfiguration>> preconfiguredProjectionsByWorkspace = config.getFederation()
                                                                                                                                   .getProjectionsByWorkspace();
                    Set<String> extSources = config.getFederation().getExternalSources();
                    this.connectors = new Connectors(this, connectorComponents, extSources, preconfiguredProjectionsByWorkspace);                   
                    logger.debug("Loading cache '{0}' from cache container {1}", cacheName, container);
                    SchematicDb database = Schematic.get(container, cacheName);

                    Channel cacheChannel = checkClustering(database);
                    // the name of the fork stack is based on the name of the cache; this will allow multiple caches to share the
                    // same JG stack
                    String forkStackId = "modeshape-" + cacheName + "-fork-stack";
                    this.clusteringService = cacheChannel != null ? ClusteringService.startForked(forkStackId, cacheChannel) : null;

                    this.documentStore = connectors.hasConnectors() ? new FederatedDocumentStore(connectors, database) : new LocalDocumentStore(
                                                                                                                                                database);
                    this.txnMgr = this.documentStore.transactionManager();
                    this.transactions = createTransactions(cacheName, config.getTransactionMode(), this.txnMgr);

                    suspendExistingUserTransaction();

                    // Set up the binary store ...
                    BinaryStorage binaryStorageConfig = config.getBinaryStorage();
                    binaryStore = binaryStorageConfig.getBinaryStore();
                    binaryStore.start();
                    tempContext = tempContext.with(binaryStore);

                    // Now create the registry implementation and the execution context that uses it ...
                    this.persistentRegistry = new SystemNamespaceRegistry(this);
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.