Events Development: Difference between revisions
Jump to navigation
Jump to search
(→TODO) |
|||
Line 11: | Line 11: | ||
=TODO= | =TODO= | ||
[[events TODO]] | |||
=Development= | =Development= |
Revision as of 06:28, 27 April 2016
Internal
Clone
git clone git@github.com:NovaOrdis/events.git
TODO
Development
Unnumbered Development Release
This will install a new unnumbered (same release number) "development" release locally:
cdesa mvn clean install; ./bin/install -f
Numbered Release
1. Increment (or update) the version information from $PROJECT_HOME/pom.xml.
2. Build and install
-f is not necessary:
mvn clean install; ./bin/install
3. Check in
mvn clean git add . git commit -m "starting ... version" git push
Individual Unit Test
mvn -Dmaven.surefire.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5012" -Dtest=EventsApplicationRuntimeTest clean test
How to add New Commands
This is how you code new clad commands:
A few things to keep in mind:
- The pipeline is initialized by the runtime, but there is no queue between the event processor and terminator. The command must install it.
- The command executes on the main thread and might exit (and kill the JVM in the process) before the terminator had a chance to process its queue. Always register an EndOfStreamListerer with the terminator and wait on the main thread until that listener is notified.
Terminator terminator = runtime.getTerminator(); final CountDownLatch rendezVous = new CountDownLatch(1); terminator.addEndOfStreamListener(new EndOfStreamListener() { @Override public void eventStreamEnded() { rendezVous.countDown(); } }); // ... // // wait until terminator finishes its queue // rendezVous.await();
or, better yet:
runtime.waitForEndOfStream();