Search in sources :

Example 1 with GlobalProcedures

use of org.neo4j.kernel.api.procedure.GlobalProcedures in project neo4j by neo4j.

the class SingleInstanceRoutingProcedureInstallerTest method shouldRegisterRoutingProcedures.

@Test
void shouldRegisterRoutingProcedures() throws Exception {
    DatabaseManager<?> databaseManager = mock(DatabaseManager.class);
    ConnectorPortRegister portRegister = mock(ConnectorPortRegister.class);
    ClientRoutingDomainChecker clientRoutingDomainChecker = mock(ClientRoutingDomainChecker.class);
    Config config = Config.defaults();
    LogProvider logProvider = nullLogProvider();
    SingleInstanceRoutingProcedureInstaller installer = new SingleInstanceRoutingProcedureInstaller(databaseManager, clientRoutingDomainChecker, portRegister, config, logProvider);
    GlobalProcedures procedures = spy(new GlobalProceduresRegistry());
    installer.install(procedures);
    verify(procedures, times(2)).register(any(GetRoutingTableProcedure.class));
    Set<QualifiedName> expectedNames = newSetWith(new QualifiedName(new String[] { "dbms", "routing" }, "getRoutingTable"), new QualifiedName(new String[] { "dbms", "cluster", "routing" }, "getRoutingTable"));
    Set<QualifiedName> actualNames = procedures.getAllProcedures().stream().map(ProcedureSignature::name).collect(toSet());
    assertEquals(expectedNames, actualNames);
}
Also used : ConnectorPortRegister(org.neo4j.configuration.connectors.ConnectorPortRegister) NullLogProvider.nullLogProvider(org.neo4j.logging.NullLogProvider.nullLogProvider) LogProvider(org.neo4j.logging.LogProvider) GlobalProceduresRegistry(org.neo4j.procedure.impl.GlobalProceduresRegistry) Config(org.neo4j.configuration.Config) QualifiedName(org.neo4j.internal.kernel.api.procs.QualifiedName) GlobalProcedures(org.neo4j.kernel.api.procedure.GlobalProcedures) Test(org.junit.jupiter.api.Test)

Example 2 with GlobalProcedures

use of org.neo4j.kernel.api.procedure.GlobalProcedures in project neo4j by neo4j.

the class FabricServicesBootstrap method bootstrapServices.

public void bootstrapServices() {
    LogProvider internalLogProvider = logService.getInternalLogProvider();
    @SuppressWarnings("unchecked") var databaseManager = (DatabaseManager<DatabaseContext>) resolve(DatabaseManager.class);
    var fabricDatabaseManager = register(createFabricDatabaseManager(fabricConfig), FabricDatabaseManager.class);
    var jobScheduler = resolve(JobScheduler.class);
    var monitors = resolve(Monitors.class);
    var databaseAccess = createFabricDatabaseAccess();
    var remoteExecutor = bootstrapRemoteStack();
    var localExecutor = register(new FabricLocalExecutor(fabricConfig, fabricDatabaseManager, databaseAccess), FabricLocalExecutor.class);
    var systemNanoClock = resolve(SystemNanoClock.class);
    var transactionMonitor = register(new FabricTransactionMonitor(systemNanoClock, logService, fabricConfig), FabricTransactionMonitor.class);
    var transactionCheckInterval = config.get(GraphDatabaseSettings.transaction_monitor_check_interval).toMillis();
    register(new TransactionMonitorScheduler(transactionMonitor, jobScheduler, transactionCheckInterval, null), TransactionMonitorScheduler.class);
    var errorReporter = new ErrorReporter(logService);
    register(new TransactionManager(remoteExecutor, localExecutor, errorReporter, fabricConfig, transactionMonitor, securityLog, systemNanoClock, config, availabilityGuard), TransactionManager.class);
    var cypherConfig = CypherConfiguration.fromConfig(config);
    Supplier<GlobalProcedures> proceduresSupplier = () -> resolve(GlobalProcedures.class);
    var catalogManager = register(createCatalogManger(), CatalogManager.class);
    var signatureResolver = new SignatureResolver(proceduresSupplier);
    var statementLifecycles = new FabricStatementLifecycles(databaseManager, monitors, config, systemNanoClock);
    var monitoredExecutor = jobScheduler.monitoredJobExecutor(CYPHER_CACHE);
    var cacheFactory = new ExecutorBasedCaffeineCacheFactory(job -> monitoredExecutor.execute(systemJob("Query plan cache maintenance"), job));
    var planner = register(new FabricPlanner(fabricConfig, cypherConfig, monitors, cacheFactory, signatureResolver), FabricPlanner.class);
    var useEvaluation = register(new UseEvaluation(catalogManager, proceduresSupplier, signatureResolver), UseEvaluation.class);
    register(new FabricReactorHooksService(errorReporter), FabricReactorHooksService.class);
    Executor fabricWorkerExecutor = jobScheduler.executor(FABRIC_WORKER);
    var fabricExecutor = new FabricExecutor(fabricConfig, planner, useEvaluation, catalogManager, internalLogProvider, statementLifecycles, fabricWorkerExecutor);
    register(fabricExecutor, FabricExecutor.class);
    register(new TransactionBookmarkManagerFactory(fabricDatabaseManager), TransactionBookmarkManagerFactory.class);
}
Also used : FabricStatementLifecycles(org.neo4j.fabric.executor.FabricStatementLifecycles) FabricExecutor(org.neo4j.fabric.executor.FabricExecutor) DatabaseManager(org.neo4j.dbms.database.DatabaseManager) FabricDatabaseManager(org.neo4j.fabric.FabricDatabaseManager) SignatureResolver(org.neo4j.fabric.pipeline.SignatureResolver) UseEvaluation(org.neo4j.fabric.eval.UseEvaluation) FabricTransactionMonitor(org.neo4j.fabric.transaction.FabricTransactionMonitor) TransactionMonitorScheduler(org.neo4j.kernel.impl.api.transaction.monitor.TransactionMonitorScheduler) GlobalProcedures(org.neo4j.kernel.api.procedure.GlobalProcedures) LogProvider(org.neo4j.logging.LogProvider) ErrorReporter(org.neo4j.fabric.transaction.ErrorReporter) FabricLocalExecutor(org.neo4j.fabric.executor.FabricLocalExecutor) ThrowingFabricRemoteExecutor(org.neo4j.fabric.executor.ThrowingFabricRemoteExecutor) FabricRemoteExecutor(org.neo4j.fabric.executor.FabricRemoteExecutor) Executor(java.util.concurrent.Executor) FabricExecutor(org.neo4j.fabric.executor.FabricExecutor) FabricLocalExecutor(org.neo4j.fabric.executor.FabricLocalExecutor) ExecutorBasedCaffeineCacheFactory(org.neo4j.cypher.internal.cache.ExecutorBasedCaffeineCacheFactory) TransactionBookmarkManagerFactory(org.neo4j.fabric.bookmark.TransactionBookmarkManagerFactory) TransactionManager(org.neo4j.fabric.transaction.TransactionManager) FabricPlanner(org.neo4j.fabric.planning.FabricPlanner)

Example 3 with GlobalProcedures

use of org.neo4j.kernel.api.procedure.GlobalProcedures in project neo4j by neo4j.

the class TokenHoldersIdLookupTest method setup.

@BeforeAll
static void setup() throws KernelException {
    GlobalProcedures procs = new GlobalProceduresRegistry();
    procs.registerProcedure(TestProcedures.class);
    procs.registerFunction(TestProcedures.class);
    procs.registerAggregationFunction(TestProcedures.class);
    procName2id = new HashMap<>();
    for (ProcedureSignature signature : procs.getAllProcedures()) {
        QualifiedName name = signature.name();
        ProcedureHandle procedure = procs.procedure(name);
        procName2id.put(name.toString(), procedure.id());
    }
    funcName2id = new HashMap<>();
    procs.getAllNonAggregatingFunctions().forEach(signature -> {
        QualifiedName name = signature.name();
        UserFunctionHandle function = procs.function(name);
        funcName2id.put(name.toString(), function.id());
    });
    procs.getAllAggregatingFunctions().forEach(signature -> {
        QualifiedName name = signature.name();
        UserFunctionHandle function = procs.aggregationFunction(name);
        funcName2id.put(name.toString(), function.id());
    });
    idLookup = new TokenHoldersIdLookup(mockedTokenHolders(), procs);
}
Also used : ProcedureSignature(org.neo4j.internal.kernel.api.procs.ProcedureSignature) ProcedureHandle(org.neo4j.internal.kernel.api.procs.ProcedureHandle) GlobalProceduresRegistry(org.neo4j.procedure.impl.GlobalProceduresRegistry) UserFunctionHandle(org.neo4j.internal.kernel.api.procs.UserFunctionHandle) QualifiedName(org.neo4j.internal.kernel.api.procs.QualifiedName) GlobalProcedures(org.neo4j.kernel.api.procedure.GlobalProcedures) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 4 with GlobalProcedures

use of org.neo4j.kernel.api.procedure.GlobalProcedures in project neo4j by neo4j.

the class DatabaseManagementServiceFactory method setupProcedures.

/**
 * Creates and registers the systems procedures, including those which belong to a particular edition.
 * N.B. This method takes a {@link DatabaseManager} as an unused parameter *intentionally*, in
 * order to enforce that the databaseManager must be constructed first.
 */
@SuppressWarnings("unused")
private static void setupProcedures(GlobalModule globalModule, AbstractEditionModule editionModule, DatabaseManager<?> databaseManager) {
    Supplier<GlobalProcedures> procedureInitializer = () -> {
        Config globalConfig = globalModule.getGlobalConfig();
        Path proceduresDirectory = globalConfig.get(GraphDatabaseSettings.plugin_dir);
        LogService logService = globalModule.getLogService();
        Log internalLog = logService.getInternalLog(GlobalProcedures.class);
        Log proceduresLog = logService.getUserLog(GlobalProcedures.class);
        ProcedureConfig procedureConfig = new ProcedureConfig(globalConfig);
        Edition neo4jEdition = globalModule.getDbmsInfo().edition;
        SpecialBuiltInProcedures builtInProcedures = new SpecialBuiltInProcedures(Version.getNeo4jVersion(), neo4jEdition.toString());
        GlobalProceduresRegistry globalProcedures = new GlobalProceduresRegistry(builtInProcedures, proceduresDirectory, internalLog, procedureConfig);
        globalProcedures.registerType(Node.class, NTNode);
        globalProcedures.registerType(NodeValue.class, NTNode);
        globalProcedures.registerType(Relationship.class, NTRelationship);
        globalProcedures.registerType(RelationshipValue.class, NTRelationship);
        globalProcedures.registerType(org.neo4j.graphdb.Path.class, NTPath);
        globalProcedures.registerType(PathValue.class, NTPath);
        globalProcedures.registerType(Geometry.class, NTGeometry);
        globalProcedures.registerType(Point.class, NTPoint);
        globalProcedures.registerType(PointValue.class, NTPoint);
        // Below components are not public API, but are made available for internal
        // procedures to call, and to provide temporary workarounds for the following
        // patterns:
        // - Batch-transaction imports (GDAPI, needs to be real and passed to background processing threads)
        // - Group-transaction writes (same pattern as above, but rather than splitting large transactions,
        // combine lots of small ones)
        // - Bleeding-edge performance (KernelTransaction, to bypass overhead of working with Core API)
        globalProcedures.registerComponent(DependencyResolver.class, Context::dependencyResolver, false);
        globalProcedures.registerComponent(KernelTransaction.class, ctx -> ctx.internalTransaction().kernelTransaction(), false);
        globalProcedures.registerComponent(GraphDatabaseAPI.class, Context::graphDatabaseAPI, false);
        globalProcedures.registerComponent(SystemGraphComponents.class, ctx -> globalModule.getSystemGraphComponents(), false);
        globalProcedures.registerComponent(ValueMapper.class, Context::valueMapper, true);
        // Register injected public API components
        globalProcedures.registerComponent(Log.class, ctx -> proceduresLog, true);
        globalProcedures.registerComponent(Transaction.class, new ProcedureTransactionProvider(), true);
        globalProcedures.registerComponent(org.neo4j.procedure.TerminationGuard.class, new TerminationGuardProvider(), true);
        globalProcedures.registerComponent(SecurityContext.class, Context::securityContext, true);
        globalProcedures.registerComponent(ProcedureCallContext.class, Context::procedureCallContext, true);
        globalProcedures.registerComponent(FulltextAdapter.class, ctx -> ctx.dependencyResolver().resolveDependency(FulltextAdapter.class), true);
        globalProcedures.registerComponent(GraphDatabaseService.class, ctx -> new GraphDatabaseFacade((GraphDatabaseFacade) ctx.graphDatabaseAPI(), new ProcedureLoginContextTransformer(ctx)), true);
        globalProcedures.registerComponent(DataCollector.class, ctx -> ctx.dependencyResolver().resolveDependency(DataCollector.class), false);
        // Edition procedures
        try {
            editionModule.registerProcedures(globalProcedures, procedureConfig, globalModule, databaseManager);
        } catch (KernelException e) {
            internalLog.error("Failed to register built-in edition procedures at start up: " + e.getMessage());
        }
        globalModule.getGlobalLife().add(globalProcedures);
        return globalProcedures;
    };
    GlobalProcedures procedures = tryResolveOrCreate(GlobalProcedures.class, globalModule.getExternalDependencyResolver(), procedureInitializer);
    if (procedures instanceof Consumer) {
        ((Consumer) procedures).accept(procedureInitializer);
    }
    globalModule.getGlobalDependencies().satisfyDependency(procedures);
}
Also used : Log(org.neo4j.logging.Log) NodeValue(org.neo4j.values.virtual.NodeValue) Config(org.neo4j.configuration.Config) LifeSupport(org.neo4j.kernel.lifecycle.LifeSupport) DisabledNeoWebServer(org.neo4j.server.web.DisabledNeoWebServer) HttpConnector(org.neo4j.configuration.connectors.HttpConnector) SpecialBuiltInProcedures(org.neo4j.procedure.builtin.SpecialBuiltInProcedures) SecurityContext(org.neo4j.internal.kernel.api.security.SecurityContext) HttpsConnector(org.neo4j.configuration.connectors.HttpsConnector) ProcedureTransactionProvider(org.neo4j.procedure.impl.ProcedureTransactionProvider) Transaction(org.neo4j.graphdb.Transaction) Path(java.nio.file.Path) DatabaseIdRepository(org.neo4j.kernel.database.DatabaseIdRepository) NAMED_SYSTEM_DATABASE_ID(org.neo4j.kernel.database.DatabaseIdRepository.NAMED_SYSTEM_DATABASE_ID) ProcedureConfig(org.neo4j.procedure.impl.ProcedureConfig) RelationshipValue(org.neo4j.values.virtual.RelationshipValue) Dependencies(org.neo4j.collection.Dependencies) Geometry(org.neo4j.graphdb.spatial.Geometry) PointValue(org.neo4j.values.storable.PointValue) DatabaseContext(org.neo4j.dbms.database.DatabaseContext) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI) DatabaseStateService(org.neo4j.dbms.DatabaseStateService) Optional(java.util.Optional) PathValue(org.neo4j.values.virtual.PathValue) BoltServer(org.neo4j.bolt.BoltServer) DatabaseManagementService(org.neo4j.dbms.api.DatabaseManagementService) DatabaseManager(org.neo4j.dbms.database.DatabaseManager) ValueMapper(org.neo4j.values.ValueMapper) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) ServerSettings(org.neo4j.server.configuration.ServerSettings) LogProvider(org.neo4j.logging.LogProvider) DbmsRuntimeSystemGraphComponent(org.neo4j.dbms.database.DbmsRuntimeSystemGraphComponent) ProcedureLoginContextTransformer(org.neo4j.procedure.impl.ProcedureLoginContextTransformer) NTNode(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTNode) Function(java.util.function.Function) Supplier(java.util.function.Supplier) Node(org.neo4j.graphdb.Node) SYSTEM_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.SYSTEM_DATABASE_NAME) GlobalProcedures(org.neo4j.kernel.api.procedure.GlobalProcedures) DefaultDatabaseInitializer(org.neo4j.dbms.database.DefaultDatabaseInitializer) GraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) BoltGraphDatabaseManagementServiceSPI(org.neo4j.bolt.dbapi.BoltGraphDatabaseManagementServiceSPI) SystemGraphComponents(org.neo4j.dbms.database.SystemGraphComponents) Point(org.neo4j.graphdb.spatial.Point) DbmsInfo(org.neo4j.kernel.impl.factory.DbmsInfo) DataCollector(org.neo4j.internal.collector.DataCollector) DependencyResolver(org.neo4j.common.DependencyResolver) Lifecycle(org.neo4j.kernel.lifecycle.Lifecycle) NTGeometry(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTGeometry) SecurityProvider(org.neo4j.kernel.api.security.provider.SecurityProvider) TerminationGuardProvider(org.neo4j.procedure.impl.TerminationGuardProvider) Edition(org.neo4j.common.Edition) Version(org.neo4j.kernel.internal.Version) NTPoint(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTPoint) DatabaseManagementServiceImpl(org.neo4j.dbms.database.DatabaseManagementServiceImpl) FulltextAdapter(org.neo4j.kernel.api.impl.fulltext.FulltextAdapter) Context(org.neo4j.kernel.api.procedure.Context) AbstractEditionModule(org.neo4j.graphdb.factory.module.edition.AbstractEditionModule) NTPath(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTPath) Consumer(java.util.function.Consumer) LogService(org.neo4j.logging.internal.LogService) GlobalProceduresRegistry(org.neo4j.procedure.impl.GlobalProceduresRegistry) ProcedureCallContext(org.neo4j.internal.kernel.api.procs.ProcedureCallContext) Relationship(org.neo4j.graphdb.Relationship) KernelException(org.neo4j.exceptions.KernelException) CommunityEditionModule.tryResolveOrCreate(org.neo4j.graphdb.factory.module.edition.CommunityEditionModule.tryResolveOrCreate) NTRelationship(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTRelationship) UnableToStartDatabaseException(org.neo4j.dbms.database.UnableToStartDatabaseException) KernelTransaction(org.neo4j.kernel.api.KernelTransaction) GraphDatabaseFacade(org.neo4j.kernel.impl.factory.GraphDatabaseFacade) GlobalModule(org.neo4j.graphdb.factory.module.GlobalModule) NodeValue(org.neo4j.values.virtual.NodeValue) KernelTransaction(org.neo4j.kernel.api.KernelTransaction) ProcedureLoginContextTransformer(org.neo4j.procedure.impl.ProcedureLoginContextTransformer) ValueMapper(org.neo4j.values.ValueMapper) PathValue(org.neo4j.values.virtual.PathValue) Config(org.neo4j.configuration.Config) ProcedureConfig(org.neo4j.procedure.impl.ProcedureConfig) NTNode(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTNode) Node(org.neo4j.graphdb.Node) RelationshipValue(org.neo4j.values.virtual.RelationshipValue) TerminationGuardProvider(org.neo4j.procedure.impl.TerminationGuardProvider) SystemGraphComponents(org.neo4j.dbms.database.SystemGraphComponents) ProcedureCallContext(org.neo4j.internal.kernel.api.procs.ProcedureCallContext) GlobalProceduresRegistry(org.neo4j.procedure.impl.GlobalProceduresRegistry) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI) Consumer(java.util.function.Consumer) ProcedureTransactionProvider(org.neo4j.procedure.impl.ProcedureTransactionProvider) KernelException(org.neo4j.exceptions.KernelException) ProcedureConfig(org.neo4j.procedure.impl.ProcedureConfig) SpecialBuiltInProcedures(org.neo4j.procedure.builtin.SpecialBuiltInProcedures) Path(java.nio.file.Path) NTPath(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTPath) GraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) FulltextAdapter(org.neo4j.kernel.api.impl.fulltext.FulltextAdapter) Log(org.neo4j.logging.Log) PointValue(org.neo4j.values.storable.PointValue) Point(org.neo4j.graphdb.spatial.Point) NTPoint(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTPoint) DataCollector(org.neo4j.internal.collector.DataCollector) GlobalProcedures(org.neo4j.kernel.api.procedure.GlobalProcedures) Edition(org.neo4j.common.Edition) DependencyResolver(org.neo4j.common.DependencyResolver) Geometry(org.neo4j.graphdb.spatial.Geometry) NTGeometry(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTGeometry) Transaction(org.neo4j.graphdb.Transaction) KernelTransaction(org.neo4j.kernel.api.KernelTransaction) Relationship(org.neo4j.graphdb.Relationship) NTRelationship(org.neo4j.internal.kernel.api.procs.Neo4jTypes.NTRelationship) SecurityContext(org.neo4j.internal.kernel.api.security.SecurityContext) GraphDatabaseFacade(org.neo4j.kernel.impl.factory.GraphDatabaseFacade) LogService(org.neo4j.logging.internal.LogService)

Example 5 with GlobalProcedures

use of org.neo4j.kernel.api.procedure.GlobalProcedures in project neo4j by neo4j.

the class BuiltInDbmsProcedures method listFunctions.

@Deprecated(since = "4.3.0", forRemoval = true)
@SystemProcedure
@Description("List all functions in the DBMS.")
@Procedure(name = "dbms.functions", mode = DBMS, deprecatedBy = "SHOW FUNCTIONS command")
public Stream<FunctionResult> listFunctions() {
    DependencyResolver resolver = graph.getDependencyResolver();
    QueryExecutionEngine queryExecutionEngine = resolver.resolveDependency(QueryExecutionEngine.class);
    List<FunctionInformation> providedLanguageFunctions = queryExecutionEngine.getProvidedLanguageFunctions();
    var globalProcedures = resolver.resolveDependency(GlobalProcedures.class);
    // gets you all functions provided by the query language
    Stream<FunctionResult> languageFunctions = providedLanguageFunctions.stream().map(FunctionResult::new);
    // gets you all non-aggregating functions that are registered in the db (incl. those from libs like apoc)
    Stream<FunctionResult> loadedFunctions = globalProcedures.getAllNonAggregatingFunctions().map(f -> new FunctionResult(f, false));
    // gets you all aggregation functions that are registered in the db (incl. those from libs like apoc)
    Stream<FunctionResult> loadedAggregationFunctions = globalProcedures.getAllAggregatingFunctions().map(f -> new FunctionResult(f, true));
    return Stream.concat(Stream.concat(languageFunctions, loadedFunctions), loadedAggregationFunctions).sorted(Comparator.comparing(a -> a.name));
}
Also used : QueryExecutionEngine(org.neo4j.kernel.impl.query.QueryExecutionEngine) SystemGraphComponent(org.neo4j.dbms.database.SystemGraphComponent) Log(org.neo4j.logging.Log) StoreIdProvider(org.neo4j.storageengine.api.StoreIdProvider) Status(org.neo4j.kernel.api.exceptions.Status) FunctionInformation(org.neo4j.kernel.impl.query.FunctionInformation) Config(org.neo4j.configuration.Config) ProcedureException(org.neo4j.internal.kernel.api.exceptions.ProcedureException) ProceduresTimeFormatHelper.formatTime(org.neo4j.procedure.builtin.ProceduresTimeFormatHelper.formatTime) ProcedureCallFailed(org.neo4j.kernel.api.exceptions.Status.Procedure.ProcedureCallFailed) InternalTransaction(org.neo4j.kernel.impl.coreapi.InternalTransaction) FabricTransaction(org.neo4j.fabric.transaction.FabricTransaction) SystemProcedure(org.neo4j.kernel.api.procedure.SystemProcedure) Collections.singletonList(java.util.Collections.singletonList) Capability(org.neo4j.capabilities.Capability) UserFunctionSignature(org.neo4j.internal.kernel.api.procs.UserFunctionSignature) Map(java.util.Map) SecurityContext(org.neo4j.internal.kernel.api.security.SecurityContext) ExecutingQuery(org.neo4j.kernel.api.query.ExecutingQuery) NamedDatabaseId(org.neo4j.kernel.database.NamedDatabaseId) Transaction(org.neo4j.graphdb.Transaction) Procedure(org.neo4j.procedure.Procedure) DatabaseIdRepository(org.neo4j.kernel.database.DatabaseIdRepository) Dependencies(org.neo4j.collection.Dependencies) TrackedNetworkConnection(org.neo4j.kernel.api.net.TrackedNetworkConnection) Set(java.util.Set) SHOW_TRANSACTION(org.neo4j.internal.kernel.api.security.PrivilegeAction.SHOW_TRANSACTION) Collectors(java.util.stream.Collectors) ZoneId(java.time.ZoneId) DatabaseContext(org.neo4j.dbms.database.DatabaseContext) Internal(org.neo4j.procedure.Internal) String.format(java.lang.String.format) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI) List(java.util.List) Stream(java.util.stream.Stream) UserSegment(org.neo4j.internal.kernel.api.security.UserSegment) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) Optional(java.util.Optional) Name(org.neo4j.procedure.Name) StoreIdDecodeUtils.decodeId(org.neo4j.procedure.builtin.StoreIdDecodeUtils.decodeId) DatabaseManagementService(org.neo4j.dbms.api.DatabaseManagementService) Admin(org.neo4j.procedure.Admin) DatabaseManager(org.neo4j.dbms.database.DatabaseManager) FabricStatementLifecycles(org.neo4j.fabric.executor.FabricStatementLifecycles) KernelTransactions(org.neo4j.kernel.impl.api.KernelTransactions) QueryExecutionEngine(org.neo4j.kernel.impl.query.QueryExecutionEngine) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) Context(org.neo4j.procedure.Context) UNINITIALIZED(org.neo4j.dbms.database.SystemGraphComponent.Status.UNINITIALIZED) HashMap(java.util.HashMap) CapabilitiesService(org.neo4j.capabilities.CapabilitiesService) SYSTEM_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.SYSTEM_DATABASE_NAME) ArrayList(java.util.ArrayList) GlobalProcedures(org.neo4j.kernel.api.procedure.GlobalProcedures) HashSet(java.util.HashSet) WRITE(org.neo4j.procedure.Mode.WRITE) SystemGraphComponents(org.neo4j.dbms.database.SystemGraphComponents) Objects.requireNonNull(java.util.Objects.requireNonNull) DBMS(org.neo4j.procedure.Mode.DBMS) DependencyResolver(org.neo4j.common.DependencyResolver) TransactionManager(org.neo4j.fabric.transaction.TransactionManager) QuerySnapshot(org.neo4j.kernel.api.query.QuerySnapshot) REQUIRES_UPGRADE(org.neo4j.dbms.database.SystemGraphComponent.Status.REQUIRES_UPGRADE) READ(org.neo4j.procedure.Mode.READ) InvalidArgumentsException(org.neo4j.kernel.api.exceptions.InvalidArgumentsException) Description(org.neo4j.procedure.Description) KernelTransactionHandle(org.neo4j.kernel.api.KernelTransactionHandle) TERMINATE_TRANSACTION(org.neo4j.internal.kernel.api.security.PrivilegeAction.TERMINATE_TRANSACTION) ProcedureCallContext(org.neo4j.internal.kernel.api.procs.ProcedureCallContext) Collectors.toList(java.util.stream.Collectors.toList) NetworkConnectionTracker(org.neo4j.kernel.api.net.NetworkConnectionTracker) KernelTransaction(org.neo4j.kernel.api.KernelTransaction) ProcedureSignature(org.neo4j.internal.kernel.api.procs.ProcedureSignature) ALL(org.neo4j.internal.kernel.api.security.AdminActionOnResource.DatabaseScope.ALL) Comparator(java.util.Comparator) AdminActionOnResource(org.neo4j.internal.kernel.api.security.AdminActionOnResource) Collections(java.util.Collections) DatabaseScope(org.neo4j.internal.kernel.api.security.AdminActionOnResource.DatabaseScope) FunctionInformation(org.neo4j.kernel.impl.query.FunctionInformation) DependencyResolver(org.neo4j.common.DependencyResolver) Description(org.neo4j.procedure.Description) SystemProcedure(org.neo4j.kernel.api.procedure.SystemProcedure) SystemProcedure(org.neo4j.kernel.api.procedure.SystemProcedure) Procedure(org.neo4j.procedure.Procedure)

Aggregations

GlobalProcedures (org.neo4j.kernel.api.procedure.GlobalProcedures)5 Config (org.neo4j.configuration.Config)3 DatabaseManager (org.neo4j.dbms.database.DatabaseManager)3 GlobalProceduresRegistry (org.neo4j.procedure.impl.GlobalProceduresRegistry)3 Optional (java.util.Optional)2 Dependencies (org.neo4j.collection.Dependencies)2 DependencyResolver (org.neo4j.common.DependencyResolver)2 GraphDatabaseSettings (org.neo4j.configuration.GraphDatabaseSettings)2 SYSTEM_DATABASE_NAME (org.neo4j.configuration.GraphDatabaseSettings.SYSTEM_DATABASE_NAME)2 DatabaseManagementService (org.neo4j.dbms.api.DatabaseManagementService)2 DatabaseContext (org.neo4j.dbms.database.DatabaseContext)2 SystemGraphComponents (org.neo4j.dbms.database.SystemGraphComponents)2 Transaction (org.neo4j.graphdb.Transaction)2 ProcedureCallContext (org.neo4j.internal.kernel.api.procs.ProcedureCallContext)2 ProcedureSignature (org.neo4j.internal.kernel.api.procs.ProcedureSignature)2 SecurityContext (org.neo4j.internal.kernel.api.security.SecurityContext)2 KernelTransaction (org.neo4j.kernel.api.KernelTransaction)2 DatabaseIdRepository (org.neo4j.kernel.database.DatabaseIdRepository)2 GraphDatabaseAPI (org.neo4j.kernel.internal.GraphDatabaseAPI)2 Log (org.neo4j.logging.Log)2