@@ -0,0 +1,1097 @@
+package com.feeyo.redis.net.front.route;%0A%0Aimport com.feeyo.redis.engine.codec.RedisRequestPolicy;%0Aimport com.feeyo.redis.net.front.handler.CommandParse;%0A%0Apublic class RouteUtil %7B%0A%09%0A%09// %E6%A0%A1%E9%AA%8C%E6%8C%87%E4%BB%A4%E6%98%AF%E5%90%A6%E4%B8%BA %E4%B8%8D%E5%90%88%E6%B3%95%EF%BC%8C true %E4%B8%BA%E4%B8%8D%E5%90%88%E6%B3%95%0A%09public static boolean checkIsInvalidPolicy(int poolType, RedisRequestPolicy requestPolicy, %0A%09%09%09boolean isReadOnly, boolean isAdmin, boolean isPipeline) %7B%0A%09%09%0A%09%09// readonly %E5%8F%AA%E8%AF%BB%E6%9D%83%E9%99%90%E5%90%8E%EF%BC%8C %E4%B8%8D%E8%83%BD%E6%89%A7%E8%A1%8C%E5%86%99%E5%85%A5%E6%93%8D%E4%BD%9C%0A%09%09if ( isReadOnly && !requestPolicy.isRead()  ) %7B%0A%09%09%09return true;%0A%09%09%7D%0A%09%09%0A%09%09boolean result = false;%0A%09%09switch( requestPolicy.getLevel()  ) %7B%0A%09%09case CommandParse.DISABLED_CMD :%0A%09%09%09result = true;%0A%09%09%09break;%0A%09%09case CommandParse.NO_CLUSTER_CMD:%0A%09%09%09if ( poolType == 1 ) //%E9%9B%86%E7%BE%A4%0A%09%09%09%09result = true;%0A%09%09%09break;%0A%09%09case CommandParse.CLUSTER_CMD:%0A%09%09%09if ( poolType == 0 ) //%E9%9D%9E%E9%9B%86%E7%BE%A4%0A%09%09%09%09result = true; %0A%09%09%09break;%0A%09%09case CommandParse.PUBSUB_CMD:%0A%09%09%09if ( isPipeline )%09// pipeline %E4%B8%8D%E6%94%AF%E6%8C%81 pubsub%0A%09%09%09%09result = true;%0A%09%09%09break;%0A%09%09case CommandParse.MANAGE_CMD:%0A%09%09%09if ( isPipeline )%0A%09%09%09%09result = true;%0A%09%09%09if ( !isAdmin )%0A%09%09%09%09result = true;%0A%09%09%09break;%0A%09%09case CommandParse.UNKNOW_CMD:%0A%09%09%09result = true;%0A%09%09%09break;%0A%09%09%7D%0A%09%09return result;%0A%09%7D%0A%0A%7D%0A

add routeutil