public boolean acquire(final Object o) {
        if (Objects.isNull(o)) {
            throw new NullPointerException();
        }
        if (memory.sum() >= memoryLimit) {
            return false;
        }
        acquireLock.lock();
        try {
            final long sum = memory.sum();
            final long objectSize = inst.getObjectSize(o);
            if (sum + objectSize >= memoryLimit) {
                return false;
            }
            memory.add(objectSize);
            if (memory.sum() < memoryLimit) {
                notLimited.signal();
            }
        } finally {
            acquireLock.unlock();
        }
        if (memory.sum() > 0) {
            signalNotEmpty();
        }
        return true;
    }
acquire memory by {@link Object}.
this method does not respond to interrupts.

@param o memory size to be applied by calculating
@return true if acquire success
shenyu-common/src/main/java/org/apache/shenyu/common/concurrent/MemoryLimiter.java