final ModeShapeFederationManager federationManager() { if (federationManager == null) { try { lock.lock(); if (federationManager == null) { federationManager = new ModeShapeFederationManager(session, session.repository().runningState() .documentStore()); } } finally { lock.unlock(); } } return federationManager; }
final ModeShapeFederationManager federationManager() { if (federationManager == null) { try { lock.lock(); if (federationManager == null) { federationManager = new ModeShapeFederationManager(session, session.repository().runningState() .documentStore()); } } finally { lock.unlock(); } } return federationManager; }
if (!validate || repository.documentStore().containsKey(externalNodeKeyString)) { result.add(projection); } else {
if (!validate || repository.documentStore().containsKey(externalNodeKeyString)) { result.add(projection); } else {
protected void initializeConnector( Connector connector, NamespaceRegistry registry, org.modeshape.jcr.api.nodetype.NodeTypeManager nodeTypeManager ) throws IOException, RepositoryException { // Set the execution context instance ... Reflection.setValue(connector, "context", repository.context()); // Set the execution context instance ... Reflection.setValue(connector, "translator", getDocumentTranslator()); // Set the MIME type detector ... Reflection.setValue(connector, "mimeTypeDetector", repository.mimeTypeDetector()); // Set the transaction manager Reflection.setValue(connector, "transactionManager", repository.txnManager()); // Set the ConnectorChangedSet factory Reflection.setValue(connector, "connectorChangedSetFactory", createConnectorChangedSetFactory(connector)); // Set the Environment Reflection.setValue(connector, "environment", repository.environment()); // Set the ExtraPropertiesStore instance, which is unique to this connector ... LocalDocumentStore store = repository.documentStore().localStore(); String name = connector.getSourceName(); String sourceKey = NodeKey.keyForSourceName(name); DocumentTranslator translator = getDocumentTranslator(); ExtraPropertiesStore defaultExtraPropertiesStore = new LocalDocumentStoreExtraProperties(store, sourceKey, translator); Reflection.setValue(connector, "extraPropertiesStore", defaultExtraPropertiesStore); connector.initialize(registry, nodeTypeManager); // If successful, call the 'postInitialize' method reflectively (due to inability to call directly) ... Method postInitialize = Reflection.findMethod(Connector.class, "postInitialize"); Reflection.invokeAccessibly(connector, postInitialize, new Object[] {}); }
protected void initializeConnector( Connector connector, NamespaceRegistry registry, org.modeshape.jcr.api.nodetype.NodeTypeManager nodeTypeManager ) throws IOException, RepositoryException { // Set the execution context instance ... Reflection.setValue(connector, "context", repository.context()); // Set the execution context instance ... Reflection.setValue(connector, "translator", getDocumentTranslator()); // Set the MIME type detector ... Reflection.setValue(connector, "mimeTypeDetector", repository.mimeTypeDetector()); // Set the transaction manager Reflection.setValue(connector, "transactionManager", repository.txnManager()); // Set the ConnectorChangedSet factory Reflection.setValue(connector, "connectorChangedSetFactory", createConnectorChangedSetFactory(connector)); // Set the Environment Reflection.setValue(connector, "environment", repository.environment()); // Set the ExtraPropertiesStore instance, which is unique to this connector ... LocalDocumentStore store = repository.documentStore().localStore(); String name = connector.getSourceName(); String sourceKey = NodeKey.keyForSourceName(name); DocumentTranslator translator = getDocumentTranslator(); ExtraPropertiesStore defaultExtraPropertiesStore = new LocalDocumentStoreExtraProperties(store, sourceKey, translator); Reflection.setValue(connector, "extraPropertiesStore", defaultExtraPropertiesStore); connector.initialize(registry, nodeTypeManager); // If successful, call the 'postInitialize' method reflectively (due to inability to call directly) ... Method postInitialize = Reflection.findMethod(Connector.class, "postInitialize"); Reflection.invokeAccessibly(connector, postInitialize, new Object[] {}); }
protected final DocumentStore documentStore() { return runningState().documentStore(); }
protected final DocumentStore documentStore() { return runningState().documentStore(); }
protected <R> R runInTransaction(Callable<R> operation, String...keysToLock) { return repository.runningState().documentStore().localStore().runInTransaction(operation, 0, keysToLock); } }
protected BackupService( RunningState runningState ) { this.runningState = runningState; // backup restore should not care about federation, hence only the local store should be used documentStore = this.runningState.documentStore().localStore(); binaryStore = this.runningState.binaryStore(); repositoryCache = this.runningState.repositoryCache(); }
protected BackupService( RunningState runningState ) { this.runningState = runningState; // backup restore should not care about federation, hence only the local store should be used documentStore = this.runningState.documentStore().localStore(); binaryStore = this.runningState.binaryStore(); repositoryCache = this.runningState.repositoryCache(); }