class OMKeysRenameResponse extends OMClientResponse {

  @Override
  public void addToDBBatch(OMMetadataManager omMetadataManager,
                           BatchOperation batchOperation) throws IOException {
    String volumeName = omRenameKeys.getVolume();
    String bucketName = omRenameKeys.getBucket();

    for (Map.Entry< String, OmKeyInfo> entry :
        omRenameKeys.getFromKeyAndToKeyInfo().entrySet()) {
      String fromKeyName = entry.getKey();
      OmKeyInfo newKeyInfo = entry.getValue();
      String toKeyName = newKeyInfo.getKeyName();

      omMetadataManager.getKeyTable().deleteWithBatch(batchOperation,
          omMetadataManager
              .getOzoneKey(volumeName, bucketName, fromKeyName));
      omMetadataManager.getKeyTable().putWithBatch(batchOperation,
          omMetadataManager.getOzoneKey(volumeName, bucketName, toKeyName),
          newKeyInfo);
    }
  }

  public  OMKeysRenameResponse(@Nonnull OMResponse omResponse,
                              OmRenameKeys omRenameKeys);
  public  OMKeysRenameResponse(@Nonnull OMResponse omResponse);

}