Files
scylladb/streaming/stream_receive_task.hh
Avi Kivity f3eade2f62 treewide: relicense to ScyllaDB-Source-Available-1.0
Drop the AGPL license in favor of a source-available license.
See the blog post [1] for details.

[1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
2024-12-18 17:45:13 +02:00

51 lines
1.1 KiB
C++

/*
*
* Modified by ScyllaDB
* Copyright (C) 2015-present ScyllaDB
*/
/*
* SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.0 and Apache-2.0)
*/
#pragma once
#include "streaming/stream_fwd.hh"
#include "streaming/stream_task.hh"
namespace streaming {
/**
* 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, table_id _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