@Target(value=METHOD) @Retention(value=RUNTIME) public @interface UserAggregationFunction
An aggregation function must returned an instance of a class with two annotated methods, one annotated with
UserAggregationUpdate
and one annotated with UserAggregationResult
Context
annotation. Fields declared this way are automatically injected with the
requested resource. This is how functions gain access to APIs to do work with.
All fields in the class containing the function declaration must either be static; or it must be public, non-final
and annotated with Context
.
Resources supported by default are as follows:
GraphDatabaseService
Log
TerminationGuard
If you want to maintain state between invocations to your function, simply use a static field. Note that functions may be called concurrently, meaning you need to take care to ensure the state you store in static fields can be safely accessed by multiple callers simultaneously.
Modifier and Type | Optional Element and Description |
---|---|
String |
deprecatedBy
When deprecating a function it is useful to indicate a possible
replacement procedure that clients might show in warnings
|
String |
name
Synonym for
value() |
String |
value
The namespace and name for the aggregation function, as a period-separated
string.
|
public abstract String value
myfunctions.myfunction
.
If this is left empty, the name defaults to the package name of
the class the procedure is declared in, combined with the method
name. Notably, the class name is omitted.public abstract String deprecatedBy
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.