# Invalidator.hpp
This File On Github
Ask A Question
API: latest
module: oatpp
#include "oatpp/core/provider/Invalidator.hpp"
# Invalidator
Abstract resource invalidator.
- @tparam T - resource class.
namespace oatpp { namespace provider {
template<class T>
class Invalidator : public oatpp::base::Countable {}
}}
# Methods
| Return Type | Name | Summary |
|---|---|---|
[none] | ~Invalidator | Default virtual destructor. |
void | invalidate | Invalidate resource that was previously created by the correspondent provider. |
# Invalidator::~Invalidator
Default virtual destructor.
virtual ~Invalidator() = default
# Invalidator::invalidate
Invalidate resource that was previously created by the correspondent provider.
Use-case: if provider is pool based - you can signal that this resource should not be reused anymore.
- @param resource
virtual void invalidate(const std::shared_ptr<T> &resource) = 0