Detailed Description
C++ class wrapper for the fiftyoneDegreesCollectionConfig structure.
See collection.h.
Configuration options are set using setter methods and fetched using corresponding getter methods. The names are self explanatory.
Usage Example
Public Member Functions | |
Constructors | |
| CollectionConfig () | |
| Construct a new instance of CollectionConfig with the default configuration. | |
| CollectionConfig (fiftyoneDegreesCollectionConfig *config) | |
| Construct a new instance of CollectionConfig which references an existing instance of the C structure. | |
Setters | |
| void | setCapacity (uint32_t capacity) |
| Set the number of items the cache should store, 0 for no cache. | |
| void | setConcurrency (uint16_t concurrency) |
| Set the expected number of concurrent requests. | |
| void | setLoaded (uint32_t loaded) |
| Set the number of items to load into memory from the start of the collection. | |
Getters | |
| uint32_t | getCapacity () const |
| Get the number of items the cache should store, 0 for no cache. | |
| uint16_t | getConcurrency () const |
| Get the expected number of concurrent requests. | |
| uint32_t | getLoaded () const |
| Get the number of items to load into memory from the start of the collection. | |
| fiftyoneDegreesCollectionConfig * | getConfig () const |
| Get a pointer to the underlying configuration structure. | |
Constructor & Destructor Documentation
◆ CollectionConfig() [1/2]
| FiftyoneDegrees::Common::CollectionConfig::CollectionConfig | ( | ) |
Construct a new instance of CollectionConfig with the default configuration.
This method does not set the internal config structure, so an extending class must do this if calling this constructor.
◆ CollectionConfig() [2/2]
| FiftyoneDegrees::Common::CollectionConfig::CollectionConfig | ( | fiftyoneDegreesCollectionConfig * | config | ) |
Construct a new instance of CollectionConfig which references an existing instance of the C structure.
- Parameters
-
config pointer to existing collection configuration structure
Member Function Documentation
◆ getCapacity()
| uint32_t FiftyoneDegrees::Common::CollectionConfig::getCapacity | ( | ) | const |
Get the number of items the cache should store, 0 for no cache.
- Returns
- capacity value
◆ getConcurrency()
| uint16_t FiftyoneDegrees::Common::CollectionConfig::getConcurrency | ( | ) | const |
Get the expected number of concurrent requests.
- Returns
- concurrency value
◆ getConfig()
| fiftyoneDegreesCollectionConfig * FiftyoneDegrees::Common::CollectionConfig::getConfig | ( | ) | const |
Get a pointer to the underlying configuration structure.
- Returns
- C structure pointer
◆ getLoaded()
| uint32_t FiftyoneDegrees::Common::CollectionConfig::getLoaded | ( | ) | const |
Get the number of items to load into memory from the start of the collection.
- Returns
- loaded value
◆ setCapacity()
| void FiftyoneDegrees::Common::CollectionConfig::setCapacity | ( | uint32_t | capacity | ) |
Set the number of items the cache should store, 0 for no cache.
- Parameters
-
capacity to set
◆ setConcurrency()
| void FiftyoneDegrees::Common::CollectionConfig::setConcurrency | ( | uint16_t | concurrency | ) |
Set the expected number of concurrent requests.
- Parameters
-
concurrency to set
◆ setLoaded()
| void FiftyoneDegrees::Common::CollectionConfig::setLoaded | ( | uint32_t | loaded | ) |
Set the number of items to load into memory from the start of the collection.
- Parameters
-
loaded to set
The documentation for this class was generated from the following file:
