BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
BackOff.h
1 #pragma once
2 
3 #include <Poco/SharedPtr.h>
4 #include <Poco/Timespan.h>
5 
6 namespace BeeeOn {
7 
11 class BackOff {
12 public:
13  typedef Poco::SharedPtr<BackOff> Ptr;
14 
15  virtual ~BackOff();
16 
20  virtual Poco::Timespan next() = 0;
21 
25  virtual void reset() = 0;
26 
31  static const Poco::Timespan STOP;
32 };
33 
38 public:
39  typedef Poco::SharedPtr<BackOffFactory> Ptr;
40 
41  virtual ~BackOffFactory();
42 
46  virtual BackOff::Ptr create() = 0;
47 };
48 
49 }
virtual Poco::Timespan next()=0
virtual void reset()=0
Factory for creation of preconfigured BackOff instances.
Definition: BackOff.h:37
static const Poco::Timespan STOP
Definition: BackOff.h:31
Back-off policy for retrying an operation.
Definition: BackOff.h:11
virtual BackOff::Ptr create()=0