generator.cc
// Gather and return the current IPFIX state.
Gather and return the current IPFIX state.
Gather and return the current IPFIX state .
void FlowGenerator::Gather(std::vector<std::unique_ptr<State>>* states, bool last) {
   states->clear();
   states->resize(1);
   std::unique_lock<std::mutex> ml(lock_);
   std::unique_ptr<State> stateCopy = stateFactory_->New(state_.get());
   state_.swap(stateCopy);
   (*states)[0] = std::move(stateCopy);
   clerk::IPFIX *ipfixState = reinterpret_cast<clerk::IPFIX*>((*states)[0].get());
   LOG(INFO) << "Current Flow table size: " << ipfixState->flows_.size();
}
void FlowGenerator :: Gather ( std :: vector < std :: unique_ptr < State > > * states , bool last ) { states -> clear ( ) ; states -> resize ( 1 ) ; std :: unique_lock < std :: mutex > ml ( lock_ ) ; std :: unique_ptr < State > stateCopy = stateFactory_ -> New ( state_ . get ( ) ) ; state_ . swap ( stateCopy ) ; ( * states ) [ 0 ] = std :: move ( stateCopy ) ; clerk :: IPFIX * ipfixState = reinterpret_cast < clerk :: IPFIX * > ( ( * states ) [ 0 ] . get ( ) ) ; LOG ( INFO ) << " " << ipfixState -> flows_ . size ( ) ; }
Gather and return the current IPFIX state.
Gather and return the current IPFIX state .