BUG-1281: optimize ListenerAdapter 81/8581/3
authorRobert Varga <rovarga@cisco.com>
Wed, 2 Jul 2014 19:28:46 +0000 (21:28 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Thu, 3 Jul 2014 11:52:03 +0000 (11:52 +0000)
commit9d93dee0b00b41ab5b39d3744a0e66a3421a1b86
tree808973a69ce4c83dfff3a2391a1f7929074e7509
parent8123dba37b873c6e95108ba1ce8f021d950f6541
BUG-1281: optimize ListenerAdapter

TransformerFactory should be reused, so that's what we're doing here.
Here we do not cache the transformer, as we are called from datastore
thread, which has essentially no business in this. Same goes for
DocumentBuilderFactory.

Also, the transformation to RFC3339 timestamp was compiling the same
regex over and over, so compile it once and reuse it.

Change-Id: Ia66f42fa123bbb4f86b396520757d9bc28f7b9d2
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/streams/listeners/ListenerAdapter.java