strus  0.17
statisticsBuilderInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_STATISTICS_BUILDER_INTERFACE_HPP_INCLUDED
11 #define _STRUS_STATISTICS_BUILDER_INTERFACE_HPP_INCLUDED
12 #include <cstdlib>
13 #include <string>
14 
15 namespace strus
16 {
17 
20 {
21 public:
24 
27  virtual void setNofDocumentsInsertedChange(
28  int increment)=0;
29 
35  virtual void addDfChange(
36  const char* termtype,
37  const char* termvalue,
38  int increment)=0;
39 
41  virtual void start()=0;
42 
44  virtual void rollback()=0;
45 
50  virtual bool fetchMessage( const void*& blk, std::size_t& blksize)=0;
51 };
52 }//namespace
53 #endif
54 
virtual void start()=0
Mark the current state that can be restored with a rollback.
virtual void addDfChange(const char *termtype, const char *termvalue, int increment)=0
Add a message propagating a change in the df (document frequency)
virtual bool fetchMessage(const void *&blk, std::size_t &blksize)=0
Get the packed statistics message.
virtual void setNofDocumentsInsertedChange(int increment)=0
Define the change of the number of document inserted.
Interface for a builder for a statistics message (distributed index)
Definition: statisticsBuilderInterface.hpp:19
virtual ~StatisticsBuilderInterface()
Destructor.
Definition: statisticsBuilderInterface.hpp:23
virtual void rollback()=0
Rollback to the last state marked with 'start()'.