@Override protected GraphFactory createGraphFactory( Config config ) { return new CommunityGraphFactory(); }
@Override public GraphDatabaseService getValue( HttpContext httpContext ) { return database.getGraph(); } }
public WrappedDatabase( GraphDatabaseFacade graph ) { this.graph = graph; try { start(); } catch ( Throwable throwable ) { throw new RuntimeException( throwable ); } }
private TestCommunityNeoServer( Config config, File configFile, GraphDatabaseFacadeFactory.Dependencies dependencies ) { super( config, persistent ? new CommunityGraphFactory() : new InMemoryGraphFactory(), dependencies ); this.configFile = configFile; }
@Override public void start() { log.info( "Starting..." ); this.graph = dbFactory.newGraphDatabase( config, dependencies ); // in order to speed up testing, they should not run the preload, but in production it pays to do it. if ( !isInTestMode() ) { preLoadCypherCompiler(); } isRunning = true; log.info( "Started." ); }
private InternalTransaction getInternalTransaction( HttpServletRequest request ) { long customTimeout = getTransactionTimeout( request, log ); return customTimeout > GraphDatabaseSettings.UNSPECIFIED_TIMEOUT ? beginCustomTransaction( customTimeout ) : beginDefaultTransaction(); }
@Before public void setUp() { setUpMocks(); initLogProvider(); }
private LifecycleManagingDatabase newDatabase() { return new LifecycleManagingDatabase( dbConfig, dbFactory, GraphDatabaseDependencies.newDependencies().userLogProvider( logProvider ) ); }
@Override public Injectable<E> getInjectable( ComponentContext ic, Context a, Class<E> c ) { if ( c.equals( t ) ) { return getInjectable(); } return null; }
public boolean isRunning() { return server != null && server.getDatabase() != null && server.getDatabase().isRunning(); }
public TransactionalContext createTransactionContext( String query, MapValue parameters, HttpServletRequest request ) { InternalTransaction tx = getInternalTransaction( request ); return contextFactory.newContext( HttpConnectionInfoFactory.create( request ), tx, query, parameters ); }
public ExtensionService( @Context InputFormat input, @Context OutputFormat output, @Context PluginInvocator extensions, @Context Database database ) { this.input = input; this.output = output; this.extensions = extensions; this.graphDb = database.getGraph(); }
@Override protected GraphFactory createGraphFactory( Config config ) { return new CommunityGraphFactory(); }
@Override public GraphDatabaseService graph() { return server.getDatabase().getGraph(); }
public CommunityNeoServer( Config config, Dependencies dependencies ) { this( config, new CommunityGraphFactory(), dependencies ); }
protected DatabaseActions createDatabaseActions() { return new DatabaseActions( database.getGraph() ); }
@Override protected GraphFactory createGraphFactory( Config config ) { return new CommunityGraphFactory(); }
protected DatabaseActions createDatabaseActionsObject( Database database ) { return new DatabaseActions( database.getGraph() ); }
@Override protected GraphFactory createGraphFactory( Config config ) { return new CommunityGraphFactory(); }
public Iterable<String> getNodeLabels( long node ) { return new IterableWrapper<String, Label>( database.getGraph().getNodeById( node ).getLabels() ) { @Override protected String underlyingObjectToObject( Label object ) { return object.name(); } }; }