Granada  1.54.0
Structured layer on top of C++ REST SDK for building server applications in C++. Granada implements sessions, server side plug-in framework, C++ OAuth 2.0 server, data storage access, server script running, server browsing.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Protected Attributes | List of all members
granada::cache::CacheHandlerIterator Class Referenceabstract

#include <cache_handler.h>

Inheritance diagram for granada::cache::CacheHandlerIterator:
granada::cache::RedisIterator granada::cache::SharedMapIterator

Public Member Functions

 CacheHandlerIterator ()
 
 CacheHandlerIterator (const std::string &expression)
 
virtual ~CacheHandlerIterator ()
 
virtual void set (const std::string &expression)
 
virtual const bool has_next ()=0
 
virtual const std::string next ()=0
 

Protected Attributes

std::string expression_
 

Detailed Description

Interface. Iterates over cache keys.

Constructor & Destructor Documentation

granada::cache::CacheHandlerIterator::CacheHandlerIterator ( )
inline

Constructor

granada::cache::CacheHandlerIterator::CacheHandlerIterator ( const std::string &  expression)
inline

Constructor

Parameters
expressionExpression to search keys.
                 Example:

                     session:value:*
                     => can be used to search all the keys
                     starting with "session:value"

                     *:value:*
                     => can be used to  search all keys
                     containing ":value:"
virtual granada::cache::CacheHandlerIterator::~CacheHandlerIterator ( )
inlinevirtual

Destructor

Member Function Documentation

virtual const bool granada::cache::CacheHandlerIterator::has_next ( )
pure virtual

Return true if there is another value with same pattern, false if thereis not.

Returns
True | False

Implemented in granada::cache::RedisIterator, and granada::cache::SharedMapIterator.

virtual const std::string granada::cache::CacheHandlerIterator::next ( )
pure virtual

Return the next key found with the given pattern.

Returns
found Key

Implemented in granada::cache::RedisIterator, and granada::cache::SharedMapIterator.

virtual void granada::cache::CacheHandlerIterator::set ( const std::string &  expression)
inlinevirtual

Set the iterator, useful to reuse it.

Parameters
expressionFilter pattern/expression. Example: session:TOKEN46464 => will SCAN or KEYS keys that match the given expression.

Reimplemented in granada::cache::RedisIterator, and granada::cache::SharedMapIterator.

Member Data Documentation

std::string granada::cache::CacheHandlerIterator::expression_
protected

Filter pattern/expression. SCAN or KEYS keys that match the given expression.

Example:

                     session:value:*
                     => can be used to search all the keys
                     starting with "session:value"

                     *:value:*
                     => can be used to  search all keys
                     containing ":value:"

The documentation for this class was generated from the following file: