public DefaultGraphDatabaseDependencies(Logging logging, Class<?>... settingsClasses) { super( logging, Arrays.<Class<?>>asList(settingsClasses), Iterables.<KernelExtensionFactory<?>, KernelExtensionFactory>cast( Service.load(KernelExtensionFactory.class)), Service.load(CacheProvider.class), Service.load(TransactionInterceptorProvider.class)); }
/** This is deprecated. Use {@link TestGraphDatabaseFactory} instead */ @Deprecated public ImpermanentGraphDatabase(String storeDir, Map<String, String> params) { this( storeDir, withForcedInMemoryConfiguration(params), Iterables.<KernelExtensionFactory<?>, KernelExtensionFactory>cast( Service.load(KernelExtensionFactory.class)), Service.load(CacheProvider.class), Service.load(TransactionInterceptorProvider.class)); }
/** * A non-standard way of creating an embedded {@link GraphDatabaseService} with a set of * configuration parameters. Will most likely be removed in future releases. * * <p>Creates an embedded {@link GraphDatabaseService} with a store located in <code>storeDir * </code>. If the directory shouldn't exist or isn't a neo4j store an exception will be thrown. * * @param storeDir the store directory for the db files * @param params configuration parameters */ public EmbeddedReadOnlyGraphDatabase(String storeDir, Map<String, String> params) { this( storeDir, params, Service.load(IndexProvider.class), Iterables.<KernelExtensionFactory<?>, KernelExtensionFactory>cast( Service.load(KernelExtensionFactory.class)), Service.load(CacheProvider.class), Service.load(TransactionInterceptorProvider.class)); }
public RepresentationFormatRepository(ExtensionInjector injector) { this.injector = injector; this.formats = new HashMap<MediaType, RepresentationFormat>(); for (RepresentationFormat format : Service.load(RepresentationFormat.class)) { formats.put(format.mediaType, format); } }
void startup(Logger log) { for (KernelExtension extension : Service.load(KernelExtension.class)) { try { extension.load(this); } catch (Exception ex) { log.warning("Error loading " + extension + ": " + ex); } } }
@Override void dump(StringLogger logger) { logger.logMessage("Graph Database: " + graphDb.getName() + " " + storeId); logger.logMessage("Kernel version: " + Version.getKernel()); logger.logMessage("Neo4j component versions:"); for (Version componentVersion : Service.load(Version.class)) { logger.logMessage(" " + componentVersion); } }