hazelcast/hazelcast — pull request #3323 by mboisver (2014-08-19 18:31:59+00:00)
Title: HZ-2829: Use a single thread executorService to run heartbeat task.

Re-commit into new branch off of maintenence-2.x. Add executor service
shutdown when ConnectionManager is closed.

Initial commit message below:

The Hazelcast server creates a new CallContext object for every calling
thread that performs an operation. Because the ConnectionManager uses a
new thread for every heartbeat execution (every 6-10 seconds), this
results is a memory leak of CallContext objects on the server. Instead,
use a single thread executor service to run the heartbeat check. Since
this check is only performed if the last response was not within the
timeout, it is safe to use a single thread.

More information: #2829