org.apache.rocketmq.common.protocol.header.namesrv.DeleteKVConfigRequestHeader Java Examples
The following examples show how to use
org.apache.rocketmq.common.protocol.header.namesrv.DeleteKVConfigRequestHeader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultRequestProcessorTest.java From DDMQ with Apache License 2.0 | 6 votes |
@Test public void testProcessRequest_DeleteKVConfig() throws RemotingCommandException { namesrvController.getKvConfigManager().putKVConfig("namespace", "key", "value"); DeleteKVConfigRequestHeader header = new DeleteKVConfigRequestHeader(); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_KV_CONFIG, header); request.addExtField("namespace", "namespace"); request.addExtField("key", "key"); RemotingCommand response = defaultRequestProcessor.processRequest(null, request); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); assertThat(response.getRemark()).isNull(); assertThat(namesrvController.getKvConfigManager().getKVConfig("namespace", "key")) .isNull(); }
Example #2
Source File: DefaultRequestProcessorTest.java From rocketmq-4.3.0 with Apache License 2.0 | 6 votes |
@Test public void testProcessRequest_DeleteKVConfig() throws RemotingCommandException { namesrvController.getKvConfigManager().putKVConfig("namespace", "key", "value"); DeleteKVConfigRequestHeader header = new DeleteKVConfigRequestHeader(); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_KV_CONFIG, header); request.addExtField("namespace", "namespace"); request.addExtField("key", "key"); RemotingCommand response = defaultRequestProcessor.processRequest(null, request); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); assertThat(response.getRemark()).isNull(); assertThat(namesrvController.getKvConfigManager().getKVConfig("namespace", "key")) .isNull(); }
Example #3
Source File: DefaultRequestProcessorTest.java From rocketmq-read with Apache License 2.0 | 6 votes |
@Test public void testProcessRequest_DeleteKVConfig() throws RemotingCommandException { namesrvController.getKvConfigManager().putKVConfig("namespace", "key", "value"); DeleteKVConfigRequestHeader header = new DeleteKVConfigRequestHeader(); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_KV_CONFIG, header); request.addExtField("namespace", "namespace"); request.addExtField("key", "key"); RemotingCommand response = defaultRequestProcessor.processRequest(null, request); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); assertThat(response.getRemark()).isNull(); assertThat(namesrvController.getKvConfigManager().getKVConfig("namespace", "key")) .isNull(); }
Example #4
Source File: DefaultRequestProcessorTest.java From rocketmq with Apache License 2.0 | 6 votes |
@Test public void testProcessRequest_DeleteKVConfig() throws RemotingCommandException { namesrvController.getKvConfigManager().putKVConfig("namespace", "key", "value"); DeleteKVConfigRequestHeader header = new DeleteKVConfigRequestHeader(); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_KV_CONFIG, header); request.addExtField("namespace", "namespace"); request.addExtField("key", "key"); RemotingCommand response = defaultRequestProcessor.processRequest(null, request); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); assertThat(response.getRemark()).isNull(); assertThat(namesrvController.getKvConfigManager().getKVConfig("namespace", "key")) .isNull(); }
Example #5
Source File: DefaultRequestProcessorTest.java From DDMQ with Apache License 2.0 | 6 votes |
@Test public void testProcessRequest_DeleteKVConfig() throws RemotingCommandException { namesrvController.getKvConfigManager().putKVConfig("namespace", "key", "value"); DeleteKVConfigRequestHeader header = new DeleteKVConfigRequestHeader(); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_KV_CONFIG, header); request.addExtField("namespace", "namespace"); request.addExtField("key", "key"); RemotingCommand response = defaultRequestProcessor.processRequest(null, request); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); assertThat(response.getRemark()).isNull(); assertThat(namesrvController.getKvConfigManager().getKVConfig("namespace", "key")) .isNull(); }
Example #6
Source File: DefaultRequestProcessorTest.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 6 votes |
@Test public void testProcessRequest_DeleteKVConfig() throws RemotingCommandException { namesrvController.getKvConfigManager().putKVConfig("namespace", "key", "value"); DeleteKVConfigRequestHeader header = new DeleteKVConfigRequestHeader(); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_KV_CONFIG, header); request.addExtField("namespace", "namespace"); request.addExtField("key", "key"); RemotingCommand response = defaultRequestProcessor.processRequest(null, request); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); assertThat(response.getRemark()).isNull(); assertThat(namesrvController.getKvConfigManager().getKVConfig("namespace", "key")) .isNull(); }
Example #7
Source File: DefaultRequestProcessorTest.java From rocketmq with Apache License 2.0 | 6 votes |
@Test public void testProcessRequest_DeleteKVConfig() throws RemotingCommandException { namesrvController.getKvConfigManager().putKVConfig("namespace", "key", "value"); DeleteKVConfigRequestHeader header = new DeleteKVConfigRequestHeader(); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.DELETE_KV_CONFIG, header); request.addExtField("namespace", "namespace"); request.addExtField("key", "key"); RemotingCommand response = defaultRequestProcessor.processRequest(null, request); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); assertThat(response.getRemark()).isNull(); assertThat(namesrvController.getKvConfigManager().getKVConfig("namespace", "key")) .isNull(); }
Example #8
Source File: DefaultRequestProcessor.java From DDMQ with Apache License 2.0 | 5 votes |
public RemotingCommand deleteKVConfig(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { final RemotingCommand response = RemotingCommand.createResponseCommand(null); final DeleteKVConfigRequestHeader requestHeader = (DeleteKVConfigRequestHeader) request.decodeCommandCustomHeader(DeleteKVConfigRequestHeader.class); this.namesrvController.getKvConfigManager().deleteKVConfig( requestHeader.getNamespace(), requestHeader.getKey() ); response.setCode(ResponseCode.SUCCESS); response.setRemark(null); return response; }
Example #9
Source File: DefaultRequestProcessor.java From rocketmq-4.3.0 with Apache License 2.0 | 5 votes |
public RemotingCommand deleteKVConfig(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { final RemotingCommand response = RemotingCommand.createResponseCommand(null); final DeleteKVConfigRequestHeader requestHeader = (DeleteKVConfigRequestHeader) request.decodeCommandCustomHeader(DeleteKVConfigRequestHeader.class); this.namesrvController.getKvConfigManager().deleteKVConfig( requestHeader.getNamespace(), requestHeader.getKey() ); response.setCode(ResponseCode.SUCCESS); response.setRemark(null); return response; }
Example #10
Source File: DefaultRequestProcessor.java From rocketmq-read with Apache License 2.0 | 5 votes |
public RemotingCommand deleteKVConfig(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { final RemotingCommand response = RemotingCommand.createResponseCommand(null); final DeleteKVConfigRequestHeader requestHeader = (DeleteKVConfigRequestHeader) request.decodeCommandCustomHeader(DeleteKVConfigRequestHeader.class); this.namesrvController.getKvConfigManager().deleteKVConfig( requestHeader.getNamespace(), requestHeader.getKey() ); response.setCode(ResponseCode.SUCCESS); response.setRemark(null); return response; }
Example #11
Source File: DefaultRequestProcessor.java From DDMQ with Apache License 2.0 | 5 votes |
public RemotingCommand deleteKVConfig(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { final RemotingCommand response = RemotingCommand.createResponseCommand(null); final DeleteKVConfigRequestHeader requestHeader = (DeleteKVConfigRequestHeader) request.decodeCommandCustomHeader(DeleteKVConfigRequestHeader.class); this.namesrvController.getKvConfigManager().deleteKVConfig( requestHeader.getNamespace(), requestHeader.getKey() ); response.setCode(ResponseCode.SUCCESS); response.setRemark(null); return response; }
Example #12
Source File: DefaultRequestProcessor.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 5 votes |
public RemotingCommand deleteKVConfig(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { final RemotingCommand response = RemotingCommand.createResponseCommand(null); final DeleteKVConfigRequestHeader requestHeader = (DeleteKVConfigRequestHeader) request.decodeCommandCustomHeader(DeleteKVConfigRequestHeader.class); this.namesrvController.getKvConfigManager().deleteKVConfig( requestHeader.getNamespace(), requestHeader.getKey() ); response.setCode(ResponseCode.SUCCESS); response.setRemark(null); return response; }
Example #13
Source File: DefaultRequestProcessor.java From rocketmq with Apache License 2.0 | 5 votes |
public RemotingCommand deleteKVConfig(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { final RemotingCommand response = RemotingCommand.createResponseCommand(null); final DeleteKVConfigRequestHeader requestHeader = (DeleteKVConfigRequestHeader) request.decodeCommandCustomHeader(DeleteKVConfigRequestHeader.class); this.namesrvController.getKvConfigManager().deleteKVConfig( requestHeader.getNamespace(), requestHeader.getKey() ); response.setCode(ResponseCode.SUCCESS); response.setRemark(null); return response; }