ringles commented on a change in pull request #7261: URL: https://github.com/apache/geode/pull/7261#discussion_r794943324
########## File path: geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/list/LPopExecutor.java ########## @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more contributor license + * agreements. See the NOTICE file distributed with this work for additional information regarding + * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the License. You may obtain a + * copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.apache.geode.redis.internal.commands.executor.list; + + + +import org.apache.geode.cache.Region; +import org.apache.geode.redis.internal.commands.Command; +import org.apache.geode.redis.internal.commands.executor.CommandExecutor; +import org.apache.geode.redis.internal.commands.executor.RedisResponse; +import org.apache.geode.redis.internal.commands.parameters.RedisParametersMismatchException; +import org.apache.geode.redis.internal.data.RedisData; +import org.apache.geode.redis.internal.data.RedisKey; +import org.apache.geode.redis.internal.netty.ExecutionHandlerContext; + +public class LPopExecutor implements CommandExecutor { + + @Override + public RedisResponse executeCommand(Command command, ExecutionHandlerContext context) { + Region<RedisKey, RedisData> region = context.getRegion(); + RedisKey key = command.getKey(); + // TODO: Size check needed until we implement 'count' arg (Redis 6.2+) + if (command.getProcessedCommand().size() > 2) { + throw new RedisParametersMismatchException(command.wrongNumberOfArgumentsErrorMessage()); + } Review comment: I've pulled it out. So long as we keep the LPOP argument count test Geode-specific we don't need this code, if we use exact() in RedisCommandType. ########## File path: geode-for-redis/src/main/resources/org/apache/geode/redis/internal/services/sanctioned-geode-for-redis-serializables.txt ########## @@ -3,6 +3,7 @@ org/apache/geode/redis/internal/commands/executor/BaseSetOptions$Exists,false org/apache/geode/redis/internal/commands/parameters/RedisParametersMismatchException,true,-643700717871858072 org/apache/geode/redis/internal/data/RedisDataType,false,nullType:org/apache/geode/redis/internal/data/RedisData,toStringValue:java/lang/String org/apache/geode/redis/internal/data/RedisSortedSet$MemberAddResult,false +org/apache/geode/redis/internal/data/collections/SizeableByteArrayList,false,memberOverhead:int Review comment: Moved. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
