public boolean reserveCell() {
        int n = used.get();
        logger.debug("reserve message. used {}.", n);
        while (n == size) {
            logger.trace("window is full.");
            return false;
        }
        used.incrementAndGet();
        if (buffer.get(tail) != null) {
            logger.error("tail {} is not null {}", tail, buffer.get(tail));
        }
        if (tail == last) {
            base += size;
            logger.debug("new base {}. cell {} is reserved.", base, tail);
            tail = 0;
        } else {
            logger.debug("cell {} is reserved.", tail);
            ++tail;
        }
        return true;
    }