double tryAcquireCapacity(double amount) {
        double result;
        if (amount <= currentCapacity) {
            result = 0;
        } else {
            result = amount - currentCapacity;
        }
        currentCapacity = currentCapacity - amount;
        return result;
    }
@param amount The amount of capacity to acquire from the bucket.
@return The unfulfilled amount.
aws-java-sdk-core/src/main/java/com/amazonaws/internal/TokenBucket.java