base/common/src/main/com/thesett/common/util/queues/WrapperQueue.java
private void incrementSizeAndCount(E record)
    {
        // Update the count for atomically counted queues.
        if (atomicallyCounted)
        {
            count.incrementAndGet();
        }

        // Update the size for sizeable elements and sizeable queues.
        if (sizeable && (record instanceof Sizeable))
        {
            dataSize.addAndGet(((Sizeable) record).sizeof());
        }
        else if (sizeable)
        {
            dataSize.incrementAndGet();
        }
    }
private void incrementSizeAndCount(E record)
    {
        // Update the count for atomically counted queues.
        if (atomicallyCounted)
        {
            count.incrementAndGet();
        }

        // Update the size for sizeable elements and sizeable queues.
        if (sizeable && (record instanceof Sizeable))
        {
            dataSize.addAndGet(((Sizeable) record).sizeof());
        }
        else if (sizeable)
        {
            dataSize.incrementAndGet();
        }
    }
Atomically adds to the size and count, if the queue is running in atomic counting mode, or sizeable mode and the
element is sizeable.

@param record The record to update the size and count for.