Files
scylladb/streaming/stream_receive_task.hh
Avi Kivity fcb8d040e8 treewide: use Software Package Data Exchange (SPDX) license identifiers
Instead of lengthy blurbs, switch to single-line, machine-readable
standardized (https://spdx.dev) license identifiers. The Linux kernel
switched long ago, so there is strong precedent.

Three cases are handled: AGPL-only, Apache-only, and dual licensed.
For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0),
reasoning that our changes are extensive enough to apply our license.

The changes we applied mechanically with a script, except to
licenses/README.md.

Closes #9937
2022-01-18 12:15:18 +01:00

54 lines
1.1 KiB
C++

/*
*
* Modified by ScyllaDB
* Copyright (C) 2015-present ScyllaDB
*/
/*
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
*/
#pragma once
#include "utils/UUID.hh"
#include "streaming/stream_task.hh"
#include <memory>
namespace streaming {
class stream_session;
/**
* Task that manages receiving files for the session for certain ColumnFamily.
*/
class stream_receive_task : public stream_task {
private:
// number of files to receive
int total_files;
// total size of files to receive
long total_size;
public:
stream_receive_task(shared_ptr<stream_session> _session, UUID _cf_id, int _total_files, long _total_size);
~stream_receive_task();
virtual int get_total_number_of_files() const override {
return total_files;
}
virtual long get_total_size() const override {
return total_size;
}
/**
* Abort this task.
* If the task already received all files and
* {@link org.apache.cassandra.streaming.StreamReceiveTask.OnCompletionRunnable} task is submitted,
* then task cannot be aborted.
*/
virtual void abort() override {
}
};
} // namespace streaming