From: Casey Bodley Date: Wed, 10 Oct 2018 19:11:55 +0000 (-0400) Subject: rgw: add rgw::putobj::ObjectProcessor X-Git-Tag: v14.1.0~1156^2~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=492dbe3f6b262771a25b0f95276459d917834d45;p=ceph.git rgw: add rgw::putobj::ObjectProcessor an abstract interface that deals with logical objects and their update semantics Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_putobj_processor.h b/src/rgw/rgw_putobj_processor.h new file mode 100644 index 000000000000..d071194f26c2 --- /dev/null +++ b/src/rgw/rgw_putobj_processor.h @@ -0,0 +1,38 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab +/* + * Ceph - scalable distributed file system + * + * Copyright (C) 2018 Red Hat, Inc. + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software + * Foundation. See file COPYING. + * + */ + +#pragma once + +#include "rgw_putobj.h" +#include "rgw_rados.h" + +namespace rgw::putobj { + +// a data consumer that writes an object in a bucket +class ObjectProcessor : public DataProcessor { + public: + // prepare to start processing object data + virtual int prepare() = 0; + + // complete the operation and make its result visible to clients + virtual int complete(size_t accounted_size, const std::string& etag, + ceph::real_time *mtime, ceph::real_time set_mtime, + std::map& attrs, + ceph::real_time delete_at, + const char *if_match, const char *if_nomatch, + const std::string *user_data, + rgw_zone_set *zones_trace, bool *canceled) = 0; +}; + +} // namespace rgw::putobj