code: public void setStatus(final ConnectionStatus update) {
          status.getAndSet(update);
          if (ConnectionStatus.TERMINATED == status.get()) {
              resourceSynchronizer.doNotify();
          }
      }
docs: Change connection status using get and set.
  
  @param update new update status