code: @Override
      public AttributeValue_5[] write_read_attributes_5(final AttributeValue_4[] writeValues, final String[] readNames,
                                                        final ClntIdent clIdent) throws MultiDevFailed, DevFailed {
          deviceMonitoring.startRequest("write_read_attributes_5 ", clIdent);
          clientIdentity.set(clIdent);
          final String[] names = new String[writeValues.length];
          for (int i = 0; i < names.length; i++) {
              names[i] = writeValues[i].name;
          }
  
          if (!name.equalsIgnoreCase(getAdminDeviceName())) {
              clientLocking.checkClientLocking(clIdent, names);
          }
  
          AttributeValue_5[] resultValues = null;
          final Object lock = deviceLock.getAttributeLock();
          try {
              synchronized (lock != null ? lock : new Object()) {
                  aroundInvokeImpl.aroundInvoke(new InvocationContext(ContextType.PRE_WRITE_READ_ATTRIBUTES,
                          CallType.CACHE_DEV, clIdent, name));
                  // write attributes
                  try {
                      AttributeGetterSetter.setAttributeValue4(writeValues, attributeList, stateImpl, aroundInvokeImpl,
                              clIdent);
                  } catch (final MultiDevFailed e) {
                      throw new DevFailed(e.errors[0].err_list);
                  }
                  // read attributes
                  resultValues = AttributeGetterSetter.getAttributesValues5(name, readNames, pollingManager,
                          attributeList, aroundInvokeImpl, DevSource.DEV, deviceLock, clIdent);
                  aroundInvokeImpl.aroundInvoke(new InvocationContext(ContextType.POST_WRITE_READ_ATTRIBUTES,
                          CallType.CACHE_DEV, clIdent, name));
              }
          } catch (final Exception e) {
              deviceMonitoring.addError();
              if (e instanceof DevFailed) {
                  throw (DevFailed) e;
              } else {
                  // with CORBA, the stack trace is not visible by the client if
                  // not inserted in DevFailed.
                  throw DevFailedUtils.newDevFailed(e);
              }
          }
          return resultValues;
      }
docs: Write and read attributes in a single request
  
  @param writeValues the values to write
  @param readNames   the attributes to read
  @param clIdent     the client ID
  @return the read results