Skip to content

Commit

Permalink
Update GraphDatabaseFactory javadocs and hide EnterpriseGraphDatabase…
Browse files Browse the repository at this point in the history
… from public view
  • Loading branch information
chrisvest committed Jun 26, 2017
1 parent 6d78992 commit 21ae42a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 19 deletions.
Expand Up @@ -36,10 +36,17 @@
import static org.neo4j.helpers.collection.MapUtil.stringMap;

/**
* Creates a {@link org.neo4j.graphdb.GraphDatabaseService}.
* Creates a {@link org.neo4j.graphdb.GraphDatabaseService} with Community Edition features.
* <p>
* Use {@link #newEmbeddedDatabase(File)} or
* {@link #newEmbeddedDatabaseBuilder(File)} to create a database instance.
* <p>
* <strong>Note:</strong> If you are using the Enterprise Edition of Neo4j in embedded mode, you have to create your
* database with the <a href="EnterpriseGraphDatabaseFactory.html">{@code EnterpriseGraphDatabaseFactory}</a>
* to enable the Enterprise Edition features, or the
* <a href="HighlyAvailableGraphDatabaseFactory.html">{@code HighlyAvailableGraphDatabaseFactory}</a> for the
* Enterprise and High-Availability features. There is no factory for the Causal Clustering features, because it is
* currently not possible to run a causal cluster in embedded mode.
*/
public class GraphDatabaseFactory
{
Expand Down Expand Up @@ -115,19 +122,19 @@ protected void configure( GraphDatabaseBuilder builder )
*/
@Deprecated
protected GraphDatabaseService newDatabase( File storeDir, Map<String,String> settings,
GraphDatabaseFacadeFactory.Dependencies dependencies )
GraphDatabaseFacadeFactory.Dependencies dependencies )
{
return newDatabase( storeDir, Config.embeddedDefaults( settings ), dependencies );
}

protected GraphDatabaseService newEmbeddedDatabase( File storeDir, Config config,
GraphDatabaseFacadeFactory.Dependencies dependencies )
GraphDatabaseFacadeFactory.Dependencies dependencies )
{
return GraphDatabaseFactory.this.newDatabase( storeDir, config, dependencies );
}

protected GraphDatabaseService newDatabase( File storeDir, Config config,
GraphDatabaseFacadeFactory.Dependencies dependencies )
GraphDatabaseFacadeFactory.Dependencies dependencies )
{
return new GraphDatabaseFacadeFactory( DatabaseInfo.COMMUNITY, CommunityEditionModule::new )
.newFacade( storeDir, config, dependencies );
Expand Down
Expand Up @@ -18,6 +18,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Create database instances.
* Factories and builders for creating database instances.
* <p>
* Note that your choice of {@link org.neo4j.graphdb.factory.GraphDatabaseFactory} determines what feature sets are
* available to the database instances you create.
*
* @see org.neo4j.graphdb.factory.GraphDatabaseFactory
* @see org.neo4j.graphdb.factory.GraphDatabaseBuilder
*/
package org.neo4j.graphdb.factory;
Expand Up @@ -33,7 +33,9 @@
import static org.neo4j.helpers.collection.MapUtil.stringMap;

/**
* Factory for HA Neo4j instances.
* Factory for Neo4j database instances with Enterprise Edition and High-Availability features.
*
* @see org.neo4j.graphdb.factory.GraphDatabaseFactory
*/
public class HighlyAvailableGraphDatabaseFactory extends GraphDatabaseFactory
{
Expand Down
Expand Up @@ -33,7 +33,7 @@
import org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory;

/**
* This has all the functionality of an embedded database, with the addition of services
* This has all the functionality of an Enterprise Edition embedded database, with the addition of services
* for handling clustering.
*/
public class HighlyAvailableGraphDatabase extends GraphDatabaseFacade
Expand Down
Expand Up @@ -22,18 +22,23 @@
import java.io.File;
import java.util.Map;

import org.neo4j.graphdb.EnterpriseGraphDatabase;
import org.neo4j.kernel.enterprise.EnterpriseGraphDatabase;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.factory.Edition;

import static org.neo4j.helpers.collection.MapUtil.stringMap;

/**
* Factory for Neo4j database instances with Enterprise Edition features.
*
* @see org.neo4j.graphdb.factory.GraphDatabaseFactory
*/
public class EnterpriseGraphDatabaseFactory extends GraphDatabaseFactory
{
@Override
protected GraphDatabaseBuilder.DatabaseCreator createDatabaseCreator( final File storeDir,
final GraphDatabaseFactoryState state )
final GraphDatabaseFactoryState state )
{
return new GraphDatabaseBuilder.DatabaseCreator()
{
Expand Down
Expand Up @@ -17,10 +17,9 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.graphdb;
package org.neo4j.kernel.enterprise;

import java.io.File;
import java.util.Map;

import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.impl.enterprise.EnterpriseEditionModule;
Expand All @@ -30,13 +29,6 @@

public class EnterpriseGraphDatabase extends GraphDatabaseFacade
{
public EnterpriseGraphDatabase( File storeDir, Map<String,String> params,
GraphDatabaseFacadeFactory.Dependencies dependencies )
{
new GraphDatabaseFacadeFactory( DatabaseInfo.ENTERPRISE, EnterpriseEditionModule::new )
.initFacade( storeDir, params, dependencies, this );
}

public EnterpriseGraphDatabase( File storeDir, Config config,
GraphDatabaseFacadeFactory.Dependencies dependencies )
{
Expand Down
Expand Up @@ -33,7 +33,7 @@
import org.neo4j.cluster.ClusterSettings;
import org.neo4j.cluster.ClusterSettings.Mode;
import org.neo4j.dbms.DatabaseManagementSystemSettings;
import org.neo4j.graphdb.EnterpriseGraphDatabase;
import org.neo4j.kernel.enterprise.EnterpriseGraphDatabase;
import org.neo4j.helpers.collection.Iterables;
import org.neo4j.kernel.configuration.Config;
import org.neo4j.kernel.ha.HaSettings;
Expand Down

0 comments on commit 21ae42a

Please sign in to comment.