avg_state_size = num_bytes_sent / num_state_reqs;
avg_state_size = num_bytes_sent / (double) num_state_reqs;
      public void close() throws IOException      {         if (log.isDebugEnabled())         {            log.debug("State writer " + outputStreamOwner + " is closing the socket ");         }         try         {            outputStreamOwner.close();         }         catch (IOException e)         {            throw e;         }         finally         {            if (stats)            {               synchronized (state_requesters)               {                  num_bytes_sent += bytesWrittenCounter;                  avg_state_size = num_bytes_sent / num_state_reqs;               }            }         }      }