. . that has a name and is applicable to either Nodes or Relationships.
Such an event is configurable with a Map<String, String> of properties from the neo4j.conf file. Ideally we'd resolve to type-safe fine-grained config, like with Spring's @Value annotation, but that's not included in the PR. Maybe later.
public interface ScheduledEvent<E extends Entity> extends LifecycleEvent {
Long effectiveDate(E entity);
boolean applyIfNeeded(E entity);
String indexName();
}
To Use:
Register the module and place an implementation of one or more lifecycle events on the ClassPath.
It can also be bootstrapped programmatically, and the test cases show an example of using Neo4j-expire events. (Once this is merged, I could update that module to be built on this).
Annotations:
We talked configuring events using annotations in the ticket, however I thought implementation of an interface would be better. If annotations are still desirable, that can be added.
Feel free to request any clarifications or changes.
Given a . .
. . that has a name and is applicable to either
Node
s orRelationship
s.Such an event is configurable with a
Map<String, String>
of properties from theneo4j.conf
file. Ideally we'd resolve to type-safe fine-grained config, like with Spring's@Value
annotation, but that's not included in the PR. Maybe later.There are two kinds of specialisation:
One for on-commit events . .
Another for scheduled . . .
To Use:
Annotations:
We talked configuring events using annotations in the ticket, however I thought implementation of an interface would be better. If annotations are still desirable, that can be added.
Feel free to request any clarifications or changes.