Exemple #1
0
TupleCache::~TupleCache() {
  // Drain the cache first
  drain_impl();

  for (auto iter = cache_.begin(); iter != cache_.end(); ++iter) {
    delete iter->second;
  }
}
Exemple #2
0
TupleCache::~TupleCache() {
    // Drain the cache first
    drain_impl();

    std::map<sp_int32, TupleList*>::iterator iter;
    for (iter = cache_.begin(); iter != cache_.end(); ++iter) {
        delete iter->second;
    }
}
Exemple #3
0
void TupleCache::drain(EventLoop::Status) { drain_impl(); }
Exemple #4
0
void TupleCache::add_emit_tuple(sp_int32 _task_id, const proto::system::AckTuple& _tuple) {
  if (total_size_ >= drain_threshold_bytes_) drain_impl();
  TupleList* l = get(_task_id);
  return l->add_emit_tuple(_tuple, &total_size_);
}
Exemple #5
0
sp_int64 TupleCache::add_data_tuple(sp_int32 _task_id, const proto::api::StreamId& _streamid,
                                    proto::system::HeronDataTuple* _tuple) {
  if (total_size_ >= drain_threshold_bytes_) drain_impl();
  TupleList* l = get(_task_id);
  return l->add_data_tuple(_streamid, _tuple, &total_size_, &tuples_cache_max_tuple_size_);
}