MCPcopy Create free account
hub / github.com/apache/trafficserver / handle

Method handle

plugins/experimental/inliner/cache.h:68–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67 template <class... A> Read(A &&...a) : t_(std::forward<A>(a)...) {}
68 static int
69 handle(TSCont c, TSEvent e, void *d)
70 {
71 Self *const self = static_cast<Self *const>(TSContDataGet(c));
72 assert(self != nullptr);
73 switch (e) {
74 case TS_EVENT_CACHE_OPEN_READ:
75 assert(d != nullptr);
76 self->t_.hit(static_cast<TSVConn>(d));
77 break;
78 case TS_EVENT_CACHE_OPEN_READ_FAILED:
79 self->t_.miss();
80 break;
81 default:
82 assert(false); // UNREACHABLE.
83 break;
84 }
85 delete self;
86 TSContDataSet(c, nullptr);
87 TSContDestroy(c);
88 return TS_SUCCESS;
89 }
90 };
91
92 template <class T, class... A>

Callers

nothing calls this directly

Calls 5

TSContDataGetFunction · 0.85
TSContDataSetFunction · 0.85
TSContDestroyFunction · 0.85
hitMethod · 0.80
missMethod · 0.80

Tested by

no test coverage detected