streaming: Add stream_plan::listeners

This commit is contained in:
Asias He
2015-06-30 16:55:30 +08:00
parent 6f0994349a
commit 7ec2ee6b86
2 changed files with 6 additions and 9 deletions

View File

@@ -62,4 +62,9 @@ stream_plan& stream_plan::flush_before_transfer(bool flush_before_transfer_) {
return *this;
}
stream_plan& stream_plan::listeners(std::vector<stream_event_handler*> handlers) {
std::copy(handlers.begin(), handlers.end(), std::back_inserter(_handlers));
return *this;
}
}

View File

@@ -136,16 +136,8 @@ public:
* @return this object for chaining
*/
stream_plan& transfer_files(inet_address to, std::vector<stream_session::ss_table_streaming_sections> sstable_details);
stream_plan& listeners(std::vector<stream_event_handler*> handlers);
#if 0
public StreamPlan listeners(StreamEventHandler handler, StreamEventHandler... handlers)
{
this.handlers.add(handler);
if (handlers != null)
Collections.addAll(this.handlers, handlers);
return this;
}
/**
* Set custom StreamConnectionFactory to be used for establishing connection
*