Do not instantiate executor service for tasks 23/78823/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 15 Dec 2018 19:01:09 +0000 (20:01 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 15 Dec 2018 19:35:23 +0000 (20:35 +0100)
commit21b1ea01fe67364962943dc62f699da8d7f068f1
tree35f25d0933b068d251df9e4865c9290d7854696b
parent5d06f4cd5ffe600bcd5013f54b0f4e8fa24f1f67
Do not instantiate executor service for tasks

Netty channel (which backs each BGPSession) is itself backed by
an EventLoop, which is an implementation of ScheduledExecutorService.

Take advantage of this to schedule the timers we need, instead
of leaking threads by allocating executor services again and
again.

Change-Id: I6bb4bf8d63abd0af0c8cf10012a905db8fa0975d
JIRA: BGPCEP-495
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPPeer.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPSessionImpl.java
bgp/rib-mock/pom.xml
bgp/rib-mock/src/main/java/org/opendaylight/protocol/bgp/rib/mock/EventBusRegistration.java
bgp/rib-spi/src/main/java/org/opendaylight/protocol/bgp/rib/spi/BGPSession.java