public boolean tryAcquireCachePermits(int sizeInByte, ProcessResult procResult) {
        if (this.globalCacheQuota == null) {
            return this.sdkPkgCacheQuota.tryAcquire(sizeInByte, procResult);
        } else {
            if (this.globalCacheQuota.tryAcquire(sizeInByte, procResult)) {
                if (this.sdkPkgCacheQuota.tryAcquire(sizeInByte, procResult)) {
                    return true;
                } else {
                    this.globalCacheQuota.release(sizeInByte);
                    return false;
                }
            }
            return false;
        }
    }
Base Sender class:

Used to manage Sender metadata information, including Sender ID,
 status, network interaction, metadata query object, and
 Proxy node metadata information obtained from Manager, etc.
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/sender/BaseSender.java