class Redis

def shutdown

Synchronously save the dataset to disk and then shut down the server.
def shutdown
  synchronize do |client|
    client.with_reconnect(false) do
      begin
        client.call [:shutdown]
      rescue ConnectionError
        # This means Redis has probably exited.
        nil
      end
    end
  end
end