Search in sources :

Example 1 with TransactionalCommand

use of com.ctrip.xpipe.redis.core.protocal.cmd.transaction.TransactionalCommand in project x-pipe by ctripcorp.

the class MinSlavesRedisReadOnly method createTransactionalCommand.

private Command<?> createTransactionalCommand(int number) {
    SimpleObjectPool<NettyClient> clientPool = keyedObjectPool.getKeyPool(new InetSocketAddress(ip, port));
    ConfigSetMinSlavesToWrite configSetMinSlavesToWrite = new ConfigSetMinSlavesToWrite(null, number, scheduled);
    return new TransactionalCommand(clientPool, scheduled, configSetMinSlavesToWrite, new ConfigRewrite(null, scheduled));
}
Also used : NettyClient(com.ctrip.xpipe.netty.commands.NettyClient) ConfigRewrite(com.ctrip.xpipe.redis.core.protocal.cmd.ConfigRewrite) InetSocketAddress(java.net.InetSocketAddress) ConfigSetMinSlavesToWrite(com.ctrip.xpipe.redis.core.protocal.cmd.ConfigSetCommand.ConfigSetMinSlavesToWrite) TransactionalCommand(com.ctrip.xpipe.redis.core.protocal.cmd.transaction.TransactionalCommand)

Aggregations

NettyClient (com.ctrip.xpipe.netty.commands.NettyClient)1 ConfigRewrite (com.ctrip.xpipe.redis.core.protocal.cmd.ConfigRewrite)1 ConfigSetMinSlavesToWrite (com.ctrip.xpipe.redis.core.protocal.cmd.ConfigSetCommand.ConfigSetMinSlavesToWrite)1 TransactionalCommand (com.ctrip.xpipe.redis.core.protocal.cmd.transaction.TransactionalCommand)1 InetSocketAddress (java.net.InetSocketAddress)1