uint32_t event,
uint64_t bySeqno,
cb::const_byte_buffer key,
- cb::const_byte_buffer eventData);
+ cb::const_byte_buffer eventData) override;
bool doRollback(uint32_t opaque, uint16_t vbid, uint64_t rollbackSeqno);
return ENGINE_DISCONNECT;
}
+static ENGINE_ERROR_CODE EvpDcpSystemEvent(ENGINE_HANDLE* handle,
+ const void* cookie,
+ uint32_t opaque,
+ uint16_t vbucket,
+ uint32_t event,
+ uint64_t bySeqno,
+ cb::const_byte_buffer key,
+ cb::const_byte_buffer eventData) {
+ auto engine = acquireEngine(handle);
+ ConnHandler* conn = engine->getConnHandler(cookie);
+ if (conn) {
+ return conn->systemEvent(
+ opaque, vbucket, event, bySeqno, key, eventData);
+ }
+ return ENGINE_DISCONNECT;
+}
+
static void EvpHandleDisconnect(const void* cookie,
ENGINE_EVENT_TYPE type,
const void* event_data,
ENGINE_HANDLE_V1::dcp.buffer_acknowledgement = EvpDcpBufferAcknowledgement;
ENGINE_HANDLE_V1::dcp.control = EvpDcpControl;
ENGINE_HANDLE_V1::dcp.response_handler = EvpDcpResponseHandler;
+ ENGINE_HANDLE_V1::dcp.system_event = EvpDcpSystemEvent;
ENGINE_HANDLE_V1::set_log_level = EvpSetLogLevel;
serverApi = getServerApiFunc();
return false;
}
+ENGINE_ERROR_CODE ConnHandler::systemEvent(uint32_t opaque,
+ uint16_t vbucket,
+ uint32_t event,
+ uint64_t bySeqno,
+ cb::const_byte_buffer key,
+ cb::const_byte_buffer eventData) {
+ logger.log(EXTENSION_LOG_WARNING,
+ "Disconnecting - This connection doesn't "
+ "support the dcp system_event API");
+ return ENGINE_DISCONNECT;
+}
+
const Logger& ConnHandler::getLogger() const {
return logger;
}
*/
virtual bool handleResponse(protocol_binary_response_header* resp);
+ virtual ENGINE_ERROR_CODE systemEvent(uint32_t opaque,
+ uint16_t vbucket,
+ uint32_t event,
+ uint64_t bySeqno,
+ cb::const_byte_buffer key,
+ cb::const_byte_buffer eventData);
+
EventuallyPersistentEngine& engine() {
return engine_;
}