diff --git a/redisson/src/main/java/org/redisson/Redisson.java b/redisson/src/main/java/org/redisson/Redisson.java index e8b641d7a..608cd6378 100755 --- a/redisson/src/main/java/org/redisson/Redisson.java +++ b/redisson/src/main/java/org/redisson/Redisson.java @@ -20,7 +20,7 @@ import org.redisson.api.redisnode.*; import org.redisson.client.codec.Codec; import org.redisson.codec.JsonCodec; import org.redisson.command.CommandAsyncExecutor; -import org.redisson.command.CommandSyncService; +import org.redisson.command.CommandAsyncService; import org.redisson.config.Config; import org.redisson.config.ConfigSupport; import org.redisson.connection.ConnectionManager; @@ -71,7 +71,7 @@ public class Redisson implements RedissonClient { if (config.isReferenceEnabled()) { objectBuilder = new RedissonObjectBuilder(this); } - commandExecutor = new CommandSyncService(connectionManager, objectBuilder); + commandExecutor = new CommandAsyncService(connectionManager, objectBuilder, RedissonObjectBuilder.ReferenceType.DEFAULT); evictionScheduler = new EvictionScheduler(commandExecutor); writeBehindService = new WriteBehindService(commandExecutor); } diff --git a/redisson/src/main/java/org/redisson/command/CommandExecutor.java b/redisson/src/main/java/org/redisson/command/CommandExecutor.java deleted file mode 100644 index a63147606..000000000 --- a/redisson/src/main/java/org/redisson/command/CommandExecutor.java +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2013-2022 Nikita Koksharov - * - * Licensed 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.redisson.command; - -/** - * - * @author Nikita Koksharov - * - */ -public interface CommandExecutor extends CommandSyncExecutor, CommandAsyncExecutor { - -} diff --git a/redisson/src/main/java/org/redisson/command/CommandSyncExecutor.java b/redisson/src/main/java/org/redisson/command/CommandSyncExecutor.java deleted file mode 100644 index 96329ea6d..000000000 --- a/redisson/src/main/java/org/redisson/command/CommandSyncExecutor.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) 2013-2022 Nikita Koksharov - * - * Licensed 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.redisson.command; - -import org.redisson.api.RFuture; -import org.redisson.client.codec.Codec; -import org.redisson.client.protocol.RedisCommand; -import org.redisson.connection.ConnectionManager; - -/** - * - * @author Nikita Koksharov - * - */ -public interface CommandSyncExecutor { - - V get(RFuture future); - - R read(String key, RedisCommand command, Object... params); - - R read(String key, Codec codec, RedisCommand command, Object... params); - - ConnectionManager getConnectionManager(); - -} diff --git a/redisson/src/main/java/org/redisson/command/CommandSyncService.java b/redisson/src/main/java/org/redisson/command/CommandSyncService.java deleted file mode 100644 index cf417cba5..000000000 --- a/redisson/src/main/java/org/redisson/command/CommandSyncService.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) 2013-2022 Nikita Koksharov - * - * Licensed 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.redisson.command; - -import org.redisson.api.RFuture; -import org.redisson.client.codec.Codec; -import org.redisson.client.protocol.RedisCommand; -import org.redisson.connection.ConnectionManager; -import org.redisson.liveobject.core.RedissonObjectBuilder; - -/** - * - * @author Nikita Koksharov - * - */ -public class CommandSyncService extends CommandAsyncService implements CommandExecutor { - - public CommandSyncService(ConnectionManager connectionManager, RedissonObjectBuilder objectBuilder) { - super(connectionManager, objectBuilder, RedissonObjectBuilder.ReferenceType.DEFAULT); - } - - @Override - public R read(String key, RedisCommand command, Object... params) { - return read(key, codec, command, params); - } - - @Override - public R read(String key, Codec codec, RedisCommand command, Object... params) { - RFuture res = readAsync(key, codec, command, params); - return get(res); - } - -}