text: (window.webpackJsonp=window.webpackJsonp||[]).push([[190],{562:function(a,t,r){"use strict";r.r(t);var s=r(42),e=Object(s.a)({},(function(){var a=this,t=a.$createElement,r=a._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[r("h1",{attrs:{id:"invalidator-hpp"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#invalidator-hpp"}},[a._v("#")]),a._v(" Invalidator.hpp"),r("seo")],1),a._v(" "),r("p",[r("a",{attrs:{href:"https://github.com/oatpp/oatpp/blob/master/src/oatpp/core/provider/Invalidator.hpp",target:"_blank",rel:"noopener noreferrer"}},[a._v("This File On Github"),r("OutboundLink")],1),r("br"),a._v(" "),r("a",{attrs:{href:"https://github.com/oatpp/oatpp/issues/new?title=API%20question&body=In%20file:%20oatpp/core/provider/Invalidator.hpp%0A%0A%23%20Question%0A%0A%3Cyour-question-here%3E",target:"_blank",rel:"noopener noreferrer"}},[a._v("Ask A Question"),r("OutboundLink")],1)]),a._v(" "),r("p",[r("code",[a._v("API: latest")]),r("br"),a._v(" "),r("code",[a._v("module: oatpp")]),r("br"),a._v(" "),r("code",[a._v('#include "oatpp/core/provider/Invalidator.hpp"')])]),a._v(" "),r("h2",{attrs:{id:"invalidator"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#invalidator"}},[a._v("#")]),a._v(" Invalidator")]),a._v(" "),r("p",[a._v("Abstract resource invalidator. "),r("ul",[r("li",[r("strong",[a._v("@tparam")]),a._v(" T - resource class. ")])])]),a._v(" "),r("div",{staticClass:"language-cpp extra-class"},[r("pre",{pre:!0,attrs:{class:"language-cpp"}},[r("code",[r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("namespace")]),a._v(" oatpp "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("namespace")]),a._v(" provider "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),a._v(" \n  "),r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("template")]),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("class")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token class-name"}},[a._v("T")]),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v("\n  "),r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("class")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token class-name"}},[a._v("Invalidator")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v(":")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("public")]),a._v(" oatpp"),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("::")]),a._v("base"),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("::")]),a._v("Countable "),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("{")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("}")]),a._v("\n")])])]),r("h3",{attrs:{id:"methods"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#methods"}},[a._v("#")]),a._v(" Methods")]),a._v(" "),r("table",[r("thead",[r("tr",[r("th",[a._v("Return Type")]),a._v(" "),r("th",[a._v("Name")]),a._v(" "),r("th",[a._v("Summary")])])]),a._v(" "),r("tbody",[r("tr",[r("td",[r("code",[a._v("[none]")])]),a._v(" "),r("td",[r("a",{attrs:{href:"#invalidator-~invalidator"}},[a._v("~Invalidator")])]),a._v(" "),r("td",[a._v("Default virtual destructor.")])]),a._v(" "),r("tr",[r("td",[r("code",[a._v("void")])]),a._v(" "),r("td",[r("a",{attrs:{href:"#invalidator-invalidate"}},[a._v("invalidate")])]),a._v(" "),r("td",[a._v("Invalidate resource that was previously created by the correspondent provider. "),r("br")])])])]),a._v(" "),r("h3",{attrs:{id:"invalidator-invalidator"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#invalidator-invalidator"}},[a._v("#")]),a._v(" Invalidator::~Invalidator")]),a._v(" "),r("p",[a._v("Default virtual destructor.")]),a._v(" "),r("div",{staticClass:"language-cpp extra-class"},[r("pre",{pre:!0,attrs:{class:"language-cpp"}},[r("code",[r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("virtual")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("~")]),r("span",{pre:!0,attrs:{class:"token function"}},[a._v("Invalidator")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("(")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(")")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("default")]),a._v("\n")])])]),r("h3",{attrs:{id:"invalidator-invalidate"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#invalidator-invalidate"}},[a._v("#")]),a._v(" Invalidator::invalidate")]),a._v(" "),r("p",[a._v("Invalidate resource that was previously created by the correspondent provider. "),r("br"),a._v(" Use-case: if provider is pool based - you can signal that this resource should not be reused anymore. "),r("ul",[r("li",[r("strong",[a._v("@param")]),a._v(" resource ")])])]),a._v(" "),r("div",{staticClass:"language-cpp extra-class"},[r("pre",{pre:!0,attrs:{class:"language-cpp"}},[r("code",[r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("virtual")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("void")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token function"}},[a._v("invalidate")]),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("(")]),r("span",{pre:!0,attrs:{class:"token keyword"}},[a._v("const")]),a._v(" std"),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("::")]),a._v("shared_ptr"),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("T"),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("&")]),a._v("resource"),r("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v(")")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v(" "),r("span",{pre:!0,attrs:{class:"token number"}},[a._v("0")]),a._v("\n")])])])])}),[],!1,null,null,null);t.default=e.exports}}]);