Example #1
0
        protected void ExecuteCommand([NotNull] TCommand command, [NotNull] ICommandMetrics metrics)
        {
            IThriftConnection connectionInPool;

            using (metrics.NewAcquireConnectionFromPoolContext())
                connectionInPool = connectionPool.Acquire(command.CommandContext.KeyspaceName);
            ExecuteCommandInPool(connectionInPool, command, metrics);
            connectionPool.Good(connectionInPool);
            connectionPool.Release(connectionInPool);
        }