class OMKeyRenameResponse extends OMClientResponse {

  @Override
  public void addToDBBatch(OMMetadataManager omMetadataManager,
      BatchOperation batchOperation) throws IOException {
    String volumeName = renameKeyInfo.getVolumeName();
    String bucketName = renameKeyInfo.getBucketName();
    omMetadataManager.getKeyTable().deleteWithBatch(batchOperation,
        omMetadataManager.getOzoneKey(volumeName, bucketName, fromKeyName));
    omMetadataManager.getKeyTable().putWithBatch(batchOperation,
        omMetadataManager.getOzoneKey(volumeName, bucketName, toKeyName),
        renameKeyInfo);
  }

  public  OMKeyRenameResponse(@Nonnull OMResponse omResponse,
      String fromKeyName, String toKeyName, @Nonnull OmKeyInfo renameKeyInfo);
  public  OMKeyRenameResponse(@Nonnull OMResponse omResponse);

}