private boolean testAndSetPaused(boolean newValue) {

    synchronized (_messageDispatcher._pausedLock) {
      if (_isPaused != newValue) {
        _isPaused = newValue;
        _messageDispatcher._pausedLock.notifyAll();
        return !_isPaused;
      } else {
        _messageDispatcher._pausedLock.notifyAll();
        return _isPaused;
      }
    }
  }
Close the <code>CacheClientProxy</code>.

@param checkQueue Whether to message check the queue and process any contained messages (up to
       MAXIMUM_SHUTDOWN_PEEKS).
@param stoppedNormally Whether client stopped normally

@return whether to keep this <code>CacheClientProxy</code>
@see CacheClientProxy#MAXIMUM_SHUTDOWN_PEEKS
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/CacheClientProxy.java