8 #ifndef __UNIRETRYGEN_H
9 #define __UNIRETRYGEN_H
11 #include "unifiltergen.h"
12 #include "wvtimeutils.h"
45 typedef wv::function<void(
UniRetryGen&)> ReconnectCallback;
53 ReconnectCallback reconnect_callback;
55 time_t retry_interval_ms;
56 WvTime next_reconnect_attempt;
58 void maybe_disconnect();
59 void maybe_reconnect();
64 ReconnectCallback _reconect_callback = ReconnectCallback(),
65 time_t _retry_internal_ms = 5000);
82 #endif //__UNIRETRYGEN_H
virtual void flush_buffers()
Flushes any commitment/notification buffers .
A UniConfGen that reconnects to an inner generator specified by a moniker whenever the inner generato...
virtual bool refresh()
Refreshes information about a key recursively.
virtual bool exists(const UniConfKey &key)
Without fetching its value, returns true if a key exists.
Based on (and interchangeable with) struct timeval.
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
virtual void commit()
Commits any changes.
WvString is an implementation of a simple and efficient printable-string class.
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's.
virtual bool isok()
Determines if the generator is usable and working properly.
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
virtual void prefetch(const UniConfKey &key, bool recursive)
Indicate that we will eventually be interested in doing get(), haschildren(), or other "get-like" ope...
virtual Iter * recursiveiterator(const UniConfKey &key)
Like iterator(), but the returned iterator is recursive, that is, it will return children of the imme...
A UniConfGen that delegates all requests to an inner generator.